werdunloaded

Warper
Member
Joined
Oct 8, 2016
Messages
2
Reaction score
0
Primarily Uses
N/A
I'm trying to create a Common Event where a variable increases by 1 after taking an X number of steps. For example, every 5 steps will increase the variable by 1. Then after 25 steps, that variable will be 5. Thoughts on how to accomplish this?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,903
Reaction score
8,596
First Language
German
Primarily Uses
RMMV
you need to use control variable command to load the current step number into a variable and compare it to the previously stored (in a different variable) step number. If the difference is 5, store the current number and increase the counter by one.


I'll be a bit tricky because you need a parallel process with a good number of waits, and the best wait number can only be discovered by testing - too few waits and the game will lag, too many waits and there is the risk of skipping steps.
 

Dalamar

Veteran
Veteran
Joined
Apr 29, 2013
Messages
370
Reaction score
61
First Language
English
Primarily Uses
RMMV
Someone else had asked for a variable to be counted every step and this worked for that, with a few minor changes could be for 5 steps as well:

 

Latest Threads

Latest Posts

Latest Profile Posts

While was working on one of the monsters that will appear in my horor game I may have made harold a Lovecraftian monster. (I used his head to keep things aligned.)
Finally got my website fixed and the security sorted so it's been a productive day. Can I go to sleep now? I mean... I don't need to work right?
It's always a good idea to refresh yourself on what your plugins do. I'm working on a map with opening walls, and I was about to tear my hair out over how much image editing and hand-constructing of autotiles I'd have to do, when I looked again and saw @Shaz 's Tile Changer could copy areas from another map.
"sorry it took me so long to respond" - can we please agree not to say that anymore unless it actually took a long time?! (Like 36hrs at least) I mean, I'm running out of funny responses here xD
Ugh... 4:53AM over here and I can't sleep so why not just game make.

Forum statistics

Threads
115,923
Messages
1,094,067
Members
151,178
Latest member
Mensito
Top