How Do I Add Variables?

Hello,

I simply want to add a variable from 0 to 4. I've seen it been done a gazillion times but it's just not working for me...

I have an event called watcher that requires variable "attempts" to equal 0 or above, 1 or above, 2 or above, etc... in order for the player to progress through a maze.

I have another event where if the player activates it(touch event) it triggers the variable "attempts" to += 1

But for some reason, when the player returns to the watcher event and triggers it, it still shows the event page for "attempts" equal to 0 or above. Even after the player has made multiple attempts trying to escape the maze.

I've even tried this in reverse with subtracting, still doesn't work.

Very frustrated, please help  ;_;
You should post pictures of the event pages for watcher event.

My initial guess is that you have the event pages in the wrong order. The tab that requires 0 or above should be the first, while 4 or above should be last (furthest to the right). If it's the other way around, it will only activate the last one and ignore the rest.

In case you have it in the right order, you can make sure the variable is actually iterating up by pressing F9 in-game. This will show the switches and variables window where you can see and change them while you're in game.
Are you sure your event is being activated and that the variable is increasing? Use F9 (debug) to see what's in the variable each time.


The other possibility is that you have another event (maybe a parallel process event, which may or may not be a common event) or a script that is resetting it to 0.
Thank you guys for the tips. When I get back to my computer I'll post some screenshots.
Hey guys,

I've narrowed it down the issue to this point, thanks for the F9 tip.

https://drive.google.com/open?id=0Bw5VRbejZmRkaE82UjBYUlVDZWM&authuser=0

https://drive.google.com/open?id=0Bw5VRbejZmRkMTdicDhjWDVvR0E&authuser=0

When that event is activated the "control variables: [0006:Attempts] += 1" doesn't add that variable. I have no other event on that map controlling any other variables.

Could the transfer be the problem? Btw, the transfer is teleporting the player to the same map just different locations on said map.

EDIT: AHH !! I see what I did wrong! I forgot to set the conditions for the second event page!

          e.g. self-switch A - on.

          Ahh, I feel so silly.  :headshake:
Aaand another case of the "posting the question then finding the answer immediately right after" scenario. Happens to everyone~ Does it work correctly now?
Yup! Works like a charm.

I knew it had to be something very simple that I was over looking.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-add-variables.38239/