I need a little help figuring out how to do something. Right now I have two simmilar problems that I can't think of how to solve.
1. I have multiple damage pops happening in my battle system but they show up too fast and you only get to see the last one.
2. I have the player entering multiple commands but these are being received with no pause in between so that I get the same command for all.
Could someone help me figure out how I would code the pause I need for these two problems? Here some bits of my code that might help understand what im doing.
1. I have multiple damage pops happening in my battle system but they show up too fast and you only get to see the last one.
2. I have the player entering multiple commands but these are being received with no pause in between so that I get the same command for all.
Could someone help me figure out how I would code the pause I need for these two problems? Here some bits of my code that might help understand what im doing.
Code:
# Damage
if @battler.damage_pop
for i in (0..@battler.damage.length)
print @battler.damage
if @battler.damage[i] != nil
damage(@battler.damage[i], @battler.critical)
@battler.damage[i] = nil
@battler.critical = false
end
end
@battler.damage_pop = false
end
Code:
# 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 = 0
end
# Set each attacks strength
for i in (0..@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