Changing Variables by Script

Bartman901

Veteran
Veteran
Joined
Jun 6, 2016
Messages
46
Reaction score
0
First Language
Polish
Primarily Uses
N/A
Heya all. So, I'm pretty dumb in writing scripts, so I decided to ask for such a little thing there. So, I just need 1 command that could allow me to change [x] variable by [(+/-) y]. I hope I said all clearly and I will be glad for an answer ;)
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
666
Reaction score
431
First Language
English
Primarily Uses
RMVXA
You can use:
Code:
$game_variables[VAR] += num
Where VAR is the number of the variable, e.g. 6, and num is the number you want to add. If you want to minus, then replace the + with -.
 

Bartman901

Veteran
Veteran
Joined
Jun 6, 2016
Messages
46
Reaction score
0
First Language
Polish
Primarily Uses
N/A
Wow, thanks a lot for a reply again :o :D I'm really thankful for your help ^^
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I just saw in a manga an interesting mechanic - setting up a stationary teleport beacon that one can go to no matter where one is in a dungeon. I think it'll work with a similar setup to how I did my airship transition.

Ooh what if you could set up multiple beacons and choose from a list of the beacons you set up?

Hmm...
Actor2_1 added!

Is the running performance of MZ output to Android platform smoother than MV output?
FINALLY GOT ALL 120 STARS IN SUPER MARIO 64!!!

Ok i got the model New and I will develop a little more, I think my SV is not beautiful yet.

Forum statistics

Threads
103,251
Messages
998,360
Members
134,748
Latest member
pie5780
Top