I'm using RPG Maker VX Ace
I'm trying to make a bank system where when you deposit say 100 gold, then it will subtract 10% and thus deposit a total
of 90 gold. My problem is when it comes to calculations, I can't use decimals such as .9 (im using script calls to do these
calculations)
I've tried using this
$game_variables[003] *= .9
it works, but the problem is it returns as a decimal, so if variable 3 = 100, then it would become 90.0
ive tried using round and to_i but those have no affect
I then tried making a new variable like this
$game_variables[006] = $game_variables[003]
$game_variables[003] *= .1
$game_variables[006] -= ($game_variables[003].round)
but this then makes the variable show up as 0 in dialogue.
If someone could help me with doing this I'd be much appreciative, and I apologize if this is the wrong forumn
I'm trying to make a bank system where when you deposit say 100 gold, then it will subtract 10% and thus deposit a total
of 90 gold. My problem is when it comes to calculations, I can't use decimals such as .9 (im using script calls to do these
calculations)
I've tried using this
$game_variables[003] *= .9
it works, but the problem is it returns as a decimal, so if variable 3 = 100, then it would become 90.0
ive tried using round and to_i but those have no affect
I then tried making a new variable like this
$game_variables[006] = $game_variables[003]
$game_variables[003] *= .1
$game_variables[006] -= ($game_variables[003].round)
but this then makes the variable show up as 0 in dialogue.
If someone could help me with doing this I'd be much appreciative, and I apologize if this is the wrong forumn