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.

Is there a way to save a characters name to a Variable?

Just like the title suggests.... I want to change the name of the hero, but store the original name in a variable so that I can recall it later.

I have the player pick his/her own name, but I want to change the name in my game and save the custom name for future use.

Is that possible?
 

khmp

Sponsor

Code:
$game_variables[XXX] = $game_actors[YYY].name

Where 'XXX' is the variable you want to save the name to. And 'YYY' is the id of the actors you want to save the name of before changing. I think that should work. Then with the name safely saved you can change it to something else. Make sure you don't overwrite it with something else.

Good luck with it FireStalker5! :thumb:
 
Dang your khmp making my life easier by resolving topics before I get home from work. Your putting me out of work... :( :)


So this post is 100% spam, make sure you don't have a number like 001, 016 073, etc. No 0s in the front, as Ruby uses this and converts the number's base format. ;)
 

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