Bookmark RPG RPG Revolution! RPG RPG Revolution RPG Maker VX.com
 
RPG Maker
 

 Username:
 Password:
   Not a member? Register!



Home > Tutorials > RPG Maker 2003 > [RM2k/2k3] Millisecond Wait

[RM2k/2k3] Millisecond Wait


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".

picture

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. 
Details
Tutorial: [RM2k/2k3] Millisecond Wait
Date Listed: 2008-06-08
Author: Jirbytaylor
Total Hits: 284


Embed
Short URL:

HTML:

BB Code:



RPG RPG Revolution
RPG RPG Revolution is your #1 stop for game development and console RPG games, as well as those created by people like you. Link to us to support us, so we may grow to be better website community for you.

RPG RPG Revolution is an Privacy Policy and Legal