#==========================================================================
# **** GENERAL CONTROLS **** #
#==========================================================================
# * Default Battler Style Switches
#--------------------------------------------------------------------------
DEFAULT_ENEMY = true # If true, these switches allows the use
DEFAULT_ACTOR = false # of default battlers for actors/enemies
DEFAULT_ENEMY_ID = [] # Ids of enemies using default battlers
DEFAULT_ACTOR_ID = [] # Ids of actors using default battlers
DEFAULT_COLLAPSE_ACTOR = false # If true, restores the old 'red fade'
DEFAULT_COLLAPSE_ENEMY = false # collapse effect (using spritesheets)
for i in 0..30
DEFAULT_ENEMY_ID.push(i)
end
taken_ids = []
for i in 0..30
# Loop to keep generating values till a unique is found.
loop do
rand_id = rand(30) # Generate an id 0-29
# Walk through the taken ids comparing random value.
for j in 0..taken_ids.size -1
# Make sure the id is not already taken.
if rand_id == taken[j]
next # Repeat loop to generate another value.
end
end
# Add the unique id to our taken id array.
taken_ids.push(rand_id)
end
DEFAULT_ENEMY_ID.push(taken_ids[i])
end
shinzo123;294984 said:I want my script *Minkoff* to recognized that i want battlers 1-30 just to throw out a number to be default battlers. how do I tell script that I want more than 1 number such as 1-30?
DEFAULT_ENEMY_ID = 1..30 # Ids of enemies using default battlers
# See if an enemy's id is within the default range:
my_enemy_id = 86
DEFAULT_ENEMY_ID.include?(enemy_id) # false
# Get the minimum and maximum value in the default range:
min = DEFAULT_ENEMY_ID.first
max = DEFAULT_ENEMY_ID.last
# Convert it to an array
DEFAULT_ENEMY_ID.to_a # [1, 2, 3, 4, 5, 6, ... 28, 29, 30]