RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED]Variables as a Word not a Number

Started by umbrageous, August 25, 2009, 02:40:15 AM

0 Members and 1 Guest are viewing this topic.

umbrageous

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.

modern algebra

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.

umbrageous


Grafikal

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.

shaz

#4
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. 
Always remember you're unique.
Just like everybody else.