Hi im trying to spruce up my battle system so based on a particular stat a character will get to make so many attack commands. What I have currently runs with no error but I still only get one attack. With my testing @num_attacks is higher then 1 but the loop I use it with never executes more then once. Could someone see what I must be obviously messing up in my for loop?
EDIT: if you think there is something else I need to post to help please lemme know.
EDIT: if you think there is something else I need to post to help please lemme know.
Code:
#--------------------------------------------------------------------------
# * Frame Update (actor command phase : enemy selection)
#--------------------------------------------------------------------------
def update_phase3_enemy_select
# Update enemy arrow
@enemy_arrow.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# End enemy selection
end_enemy_select
return
end
# If C button was pressed
if Input.trigger?(Input::C) or Input.trigger?(Input::Y) or Input.trigger?(Input::X) or Input.trigger?(Input::Z)
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set action
if @active_battler.is_a?(Game_Actor)
@num_attacks = @active_battler.stam
else
@num_attacks = 1
end
# Set each attacks strength
for i in (1..@num_attacks)
if Input.trigger?(Input::C) or Input.trigger?(Input::Y)
$atk_power[i] = "MED"
end
if Input.trigger?(Input::X)
$atk_power[i] = "STR"
end
if Input.trigger?(Input::Z)
$atk_power[i] = "WEAK"
end
end
# Set action
@active_battler.current_action.target_index = @enemy_arrow.index
# End enemy selection
end_enemy_select
# If skill window is showing
if @skill_window != nil
# End skill selection
end_skill_select
end
# If item window is showing
if @item_window != nil
# End item selection
end_item_select
end
# Go to command input for next actor
phase3_next_actor
end
end