Increase variable after X number of steps

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
31,355
Reaction score
7,668
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:

 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top