Hello,
I want to set a variable [n] as a random value, ranging between [x] and [y].
I tried to set the V[n] in a troop event (end of turn):
"Math.floor( Math.random() * ($gameVariables.value(y) - $gameVariables.value(x) + 1 )) + $gameVariables.value(x)"
Then I put the V[n] into a damage formula.
At last, I started the game and tested the battle.
After the first turn, the game crashed.
So anyone knows what's wrong?
Thanks.
I want to set a variable [n] as a random value, ranging between [x] and [y].
I tried to set the V[n] in a troop event (end of turn):
"Math.floor( Math.random() * ($gameVariables.value(y) - $gameVariables.value(x) + 1 )) + $gameVariables.value(x)"
Then I put the V[n] into a damage formula.
At last, I started the game and tested the battle.
After the first turn, the game crashed.
So anyone knows what's wrong?
Thanks.