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.

HUD disappearing when teleporting?

I'm using a HUD wich requires a picture to be shown, I show the picture with
Code:
# Make HUD 
    @sprite = Sprite.new   
    @sprite.bitmap = RPG::Cache.picture("HUD1.png")
in Scene_map, and it appears fine, I also used "@sprite.dispose" where all the others "dispose" are, and "@sprite.update" where all the others "update" are too. it works fine with disapearing whenever I enter the menu,and reapearing when i get back to the map, however, when I teleport to another map(or even the same map) my picture disapears, and doesn't come back till I enter and exit the menu again.
How can I do so when I change maps, the picture stays? (or reloads)
I'm guessing this might be pretty simple, I hope someone will be able to help me...
BTW: I tried instead of using an image, making a window with
Code:
 @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
then, updating it and disposing it in the same parts where I updated and disposed the image,
but when I teleport to another map, it works perfectly fine...
I'm guessing then that pictures work different, is there any way to make the picture not disapear when changing map?
 

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