Let me just start off by saying that, as of this moment, I have officially ended a very heartfelt relationship with the RMXP "Window"
*sigh*
Okay, I'm making a window (called ActorTurn) to display whose turn it is by using actor graphics that I've placed inside a window, in battle. I've configured all the needed coding (Window_Base, Window_ActorTurn, and Scene_Battle), but it keeps popping up with a undefined "actor.character_name" when I've used this same way of displaying things before. For the life of me, I cannot figure out wtf is going wrong!
Heres the coding:
Window_Base
def draw_turngraphic(actor, x, y)
turngraphic = RPG::Cache.picture("BattleFaces/" + actor.character_name + "Turn")
tgw = turngraphic.width
tgh = turngraphic.height
src_rect = Rect.new(0, 0, tgw, tgh)
self.contents.blt(x - tgw / 2, y - tgh, turngraphic, src_rect)
end
Window_ActorTurn
class Window_ActorTurn < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-15, 300, 147, 62)
self.opacity = 0
self.contents = Bitmap.new(width-32, height-32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for actor in $game_party.actors
actor = $game_party.actors
draw_turngraphic(actor, 0, 30)
end
end
end
Scene_Battle (I've configured everything throughout like dispose, update, etc. that's not the problem; i'm getting the error just as I enter battle)
@actorturn_window = Window_ActorTurn.new
Thanks!