[This was copied from another post of mine on another forum, so bear with me on any wording. :x]
Now most of us know about the "Wait" function right? Most of the time this is fine, if you want to reduce lag with a special custom system using Pictures or something similar, but what if you want to update something very
quickly? You can't have lower than "0.1" with the "Wait" function, which isn't quick enough for certain things.
In my case it was a variable. I wanted to increase a variable up to create a CTB/ATB system for my "Project SOAH"'s custom battle system. CTB/ATBs are basically like the default battle system of RM2k3, or of certain Final Fantasy games.
Anywho, I wanted to increase the variable that controlled the timer bars quickly, but without a pause it either caused lag or or too quick.
So I devised a little trick to create a sort of "Wait 0.02 sec". Instructions:
- Make your event that you want to use this in, note that this is best used with Parallel Processes. Add the following after your event functions. (You could add this in between some functions, but unless you know what you're doing I'd recommend not.)
- Create a Loop
- Add a "Variable Operation" that increases your specified "Wait" variable by a fair amount. I recommend "50" as here, as something about 5 causes the RPG_RT to curl over and die horribly. Make sure it is Add!
- Add a conditional branch that checks that your above specified variable to be Greater than or Equal to 2x the variable's addition specified. Make sure the "If Else" check is off. It is not needed.
- You could make the "checker" different, as I have set it to another variable so I can change the update rate - which could also be a good option for those with slower computers.
- In the conditional branch, add another "Variable Operation", Set (make sure it's Set!) the previously used variable to 0.
- Then insert a "Break Loop".
There you have it.
Any opinions or questions, ask here.