sephsblade
Member
Okay, I've got this in the Window_Battlestatus class in XP:
Which then draws 0.png on the screen fine for each actor- but then after around 6 or 7 seconds, all but the rightmost one disappears- no matter how many actors there are in the party (i.e. if there's 4 the first 3 will disappear, while if there's only one it won't disappear etc). I tried searching for the problem, and a topic suggested to use global variables- which I tried and didn't change anything. What am I doing wrong?
Sorry in advance if it's a stupid question.
Code:
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
@supermetr= Sprite.new
@supermetr.bitmap = RPG::Cache.picture('0.png')
@supermetr.x = actor_x
@supermetr.y= 60
if @level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
Which then draws 0.png on the screen fine for each actor- but then after around 6 or 7 seconds, all but the rightmost one disappears- no matter how many actors there are in the party (i.e. if there's 4 the first 3 will disappear, while if there's only one it won't disappear etc). I tried searching for the problem, and a topic suggested to use global variables- which I tried and didn't change anything. What am I doing wrong?
Sorry in advance if it's a stupid question.