brainstorm
Member
I have a problem with 'for i in...' statements. My problem is that the game is deleting all of the sprites drawn by the 'for i in' statement instead of only deleting the one I want... i = event_id (basically)
If you see the problem please tell me. If you need anymore information I'll be glad to give it.
Code:
if @shields.size >= 1
for i in 0...50
if @shields[i] != ""
Code:
if $game_map.events[i].erased == true
@shields[i].bitmap.dispose if @shields[i] != ""
@shields[i].dispose if @shields[i] != ""
@shields[i] = "" if @shields[i] != ""
@time[i] = 0
$game_map.events[i].variables[5] = 0
return
end
If you see the problem please tell me. If you need anymore information I'll be glad to give it.