This scripting noob really needs help with something. I've been learning basics lately and have edited this part in Game_Troop
In effect this stores the names of the enemies in a variable to be used later. It works great... generally.
I have set up my troops to start with an invissible enemy (to prevent auto victory) and the actual troop 'appear halfway'. Every troop holds a run on turn 0 event that checks how many party members are in the party and then randomizing the number of troops to appear based on the party size (max 4). Then it destroys the invissible enemy.
The problem I'm now experiencing is that the script does not store 'appear halfway' enemy names. Is there any scripting wizard who could walk me through how to fix this?
Thanks in advance ^^
Code:
def enemy_names
names = []
members.each do |enemy|
if enemy.alive?
names.push(enemy.original_name)
$game_variables[170] = names[0]
$game_variables[171] = names[1]
$game_variables[172] = names[2]
$game_variables[173] = names[3]
$game_variables[174] = names[4]
else
$game_variables[170] = names[0]
$game_variables[171] = names[1]
$game_variables[172] = names[2]
$game_variables[173] = names[3]
$game_variables[174] = names[4]
end
end
names
end
In effect this stores the names of the enemies in a variable to be used later. It works great... generally.
I have set up my troops to start with an invissible enemy (to prevent auto victory) and the actual troop 'appear halfway'. Every troop holds a run on turn 0 event that checks how many party members are in the party and then randomizing the number of troops to appear based on the party size (max 4). Then it destroys the invissible enemy.
The problem I'm now experiencing is that the script does not store 'appear halfway' enemy names. Is there any scripting wizard who could walk me through how to fix this?
Thanks in advance ^^