- Joined
- Jun 8, 2016
- Messages
- 7
- Reaction score
- 0
- First Language
- English
- Primarily Uses
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.
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.


