I'm making a game where the main characters have default names but can be changed by the player when they are first introduced into the game, like in your average RPG. I think/hope it should be relativly simple, how is it done?
Hmmm, sounds as easy as assigning the player's name to a string value, and when it comes time to have some text display, do something like:
Change alt string to "Wow, our village has been waiting for you " + (your string value for the player's name) + " for over a month now. What kind of hero ARE you anyways!?"
If that's what you mean,, that's one way to do it.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
To make it permanent, I'd use the ini object, right? I havrn't delt with saving values after closing an application since the first TFG. Any new ways introduced since MMF2?
Sure, you could use the ini file, I don't see why not. And it's not like a character's name is exactly sensitive information should the user open the file up and look around. It might be cool, you could always edit your name in case you were farting around and typed it in as "dA_dEmOn_No1!"
But they'd probably just change it to Maxim, one of the most overused RPG names in all of history.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
12th November, 2007 at 05:32:46 -
Keep the names in global strings, and ONLY get them out of the INIs when you load up the game (just store them into the global strings). Else, you might alter the INI in-game and immediately affect gameplay, and that is not what you might want.