Gw Temp

Menu

Tutorial - 'Unlimited Timers and Stopwatches' by Flyne

An item about RPGMaker 2000 posted on

Blurb

Are you not satisfied with RPGMaker's timers? If so, check this out to see how to extend them.

Body

Ok, this is rather obviose and rather short, but oh well.
It is also my first tutorial.

So why am I writing this? Well, basicly because I wanted to be able to make more than 1 or 2 timers.

Ok, I am just going to say what to do, no showing code or anything fancy.

Required stuff:
1 Variable for the code + one for every timer after that.
2 common events for the code + one for every timer after
that.
1 switch for every timer

Step 1: Make a common event called Base Timer. Make it parallel process with no appearence condition switch. Put in a Wait command for .1 seconds. *Then put in a Fork Condition that says if Switch ? is on, change Variable ? +1.*
The stuff within the stars should be copied for every new timer. The questionmarks represent the switch or variable #/name, and should be changed everytime you copy the code.

Step 2: For every timer, copy this code into a new parralell proscess common event. Figure out how long you want to keep the timer running in tenths of a second. Then make the event say Fork Option: variable ?(whatever you used for this timer in step 1) equals however many tenths of a second you wanted it to last. Then make the fork option do watever you want and change the switch you used to start it off.

Step 3: Where ever you want to start a timer, change switch ?(whatever you use for step 1) on.

Step 4 (optional): This is for stopwatches. Just put in the code for step 1 like it is a timer. Then make a parralell proscess common event with the start condition of switch ?(a stop switch - see step 6) is on. Put in a Change variable:Hours to Which ever variable you used for tenths of a second. Then divide Variable:Hours by 36000. Make a change variable:Minutes set to whichever variable you used for tenths of a second. Then divide it by 600. Make a change variable:second set to whichever variable you used for tenths of a second. Then divide it by 10. Then you can make a message that says "You took \V[(the number of variable:Hours)] hours, \V[(the number of variable:Minutes)] minutes, and \V[(the number of variable:Seconds)] seconds." or something like that. Finnaly, change the switch you used for this in step 1 off.

Step 5 (optional): This is for stopwatches. When you want to start it, just do as you would do for a timer in Step 2.

Step 6 (optional): This is for stopwatches. When you want to stop it, just change the switch you used for step 4 on.



That should be all. This is very easy to modify to whatever you want. You can call this you own and leave me off you credits, I really don't care.