The RPG Maker Resource Kit
RMRK RPG Maker Creation => MV => Topic started by: VianoceGames on February 05, 2016, 10:38:18 PM
-
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.
-
I found a great link for a list of script calls which I will share here: RMMV Script Calls. (https://docs.google.com/spreadsheets/d/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs/edit#gid=0) 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.
-
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
-
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:
-
thanks that a good tutorial ! :D