RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Resolved]Storing text to game variables to use in text

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 34
RMRK Junior
In VXA I could do a script call saying something like:
$game_variables[1] = "Hello"
$game_variables[2] = "World"

Then I could call those variables in a message box like:
\V[1] \V[2]

and it would come out "Hello World".

I have no idea how I would do this with js in the MV version. Any help would be greatly appreciated.
« Last Edit: February 06, 2016, 12:10:30 AM by VianoceGames »

***
Rep:
Level 34
RMRK Junior
I found a great link for a list of script calls which I will share here: RMMV Script Calls. Below is the call I was looking for.

$gameVariables.setValue(var, value);

Where you see the abbreviation "var" you put the number of the variable you wish to store the text (or string). Then where you see "value" is where you place the text. Make sure you put quotation marks around the text in the "value" part or it will run an error.

So it should read something like:
$gameVariables.setValue(1, "Hello World");

Using the variable hasn't changed, thankfully.

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
Thank you for sharing the answer. :)
Anybody interested in learning a bit of JS can also check this out - https://www.codecademy.com/learn/javascript
&&&&&&&&&&&&&&&&

***
Rep:
Level 34
RMRK Junior
Thank you for sharing the answer. :)
Anybody interested in learning a bit of JS can also check this out - https://www.codecademy.com/learn/javascript

Thanks boe, I'll be checking that link out soon! :blizj:

**
Rep:
Level 26
HF GL
thanks that a good tutorial ! :D