RPG Maker Forums

Hi ^_^


How can I manipulate in-game variables through the script command. I would like to do some simple equation like this, but for some reason it just won't work for me Q_Q.


I want to assign a value to a variable that is the result of a mathematical equation of 2 other variables. I tried using:


v[1] = v[2] - v[3];  <----- didn't work


$gameVariables.value(1) = $gameVariables.value(2) - $gameVariables.value(3);    <----- didn't work


I even tried:


var x = $gameVariables.value(2);


var y = $gameVariables.value(3);


$gameVariables.value(1) = x - y;


but it didn't work, is there something I'm missing here? I'd rather use the shorter version of the script if possible.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top