New account registration is temporarily disabled.

GETTING THE MAP NAME IN RMXP

Posts

Pages: 1
I'm looking for a way to create a window in the menu that shoes the player
what map their on? I'm assuming I can add that into the Scene_Menu section
of the script for it to work or would I have to Create a new module?
Will I tried it out going this route:

.name
end
end
class Window_Map < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 58)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
mapname = @mapinfo.name
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 120, 32, "Map:")
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 120, 32, mapname)
end end]

and I end up getting an error message saying that the method 'name' is undefined.
So what did I do wrong then?
Thanks anyways I got it to work now.
chana
(Socrates would certainly not contadict me!)
1584
You're welcome!XD
Pages: 1