Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Print Page - [RESOLVED]Variables as a Word not a Number

The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: umbrageous on August 25, 2009, 02:40:15 AM

Title: [RESOLVED]Variables as a Word not a Number
Post by: umbrageous on August 25, 2009, 02:40:15 AM
How would I set a Variable instead of an Integer as a String or readable Text. i know \V[] but could i do that in a way that could for example show a name and no not the Actors Name.... I know its kind of Uber specific. but I need a
Variable
As Text
Not
A Number.
Title: Re: Variables as a Word not a Number
Post by: modern algebra on August 25, 2009, 02:53:19 AM
You can't do it through events, but you can do it through a little call script:


$game_variables[id] = "text"


If you try to use that variable in anything but a set operation in Control Variables, though, it will return an error. I assume you only want it to \v[id] for.
Title: Re: Variables as a Word not a Number
Post by: umbrageous on August 26, 2009, 02:22:01 AM
Thanks :D
Title: Re: [RESOLVED]Variables as a Word not a Number
Post by: Grafikal on August 30, 2009, 02:02:49 AM
So this would work like:

NPC: Meet me at \v[1].

CallScript: $game_variables[1] = "Awesometown"

and would show up like:

NPC: Meet me at Awesometown.

?

Cause...this is good to know.
Title: Re: [RESOLVED]Variables as a Word not a Number
Post by: shaz on August 30, 2009, 02:12:41 AM
Yes, that's exactly how it works.  Of course, you have to set your game variable first, before the NPC speaks.  So your NPC: and CallScript: lines would be swapped around.

I've had issues trying to use it with the Show Choices command, but I think I established that it was only a bug with the UMS I'm using, and when I tried it with the RTP it worked correctly.