Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How do I save a Map Name as a variable?

HI their everyone!
Well, I have finally broken down and am learning how to RGSS.
My question is this:
How can I take the name out of the map properties for a map the player is currently on and stick it into a variable (?) so I can call it in a window and place it on my HUD?

I.E.
I name my map in the map properties "Super Awesome Map"
then on screen when I am on that amp it will say "Super Awesome Map"
I am not asking anyone to do this for me, I just need help with saving that aspect into a variable(?) so I can call it.
Thanks!
 
First you have to read the file MapInfos.rxdata like this:
Code:
$data_map_infos = load_data("Data/MapInfos.rxdata")

After that you can draw the map name with the command:
Code:
self.contents.draw_text(x, y, width, height, $data_map_infos[$game_map.map_id].name)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top