# Gw Temp

## Tutorial - 'Game Timer' by OpenBB-MrCary

An item about RPGMaker 2000 posted on

### Blurb

Create a basic Game timer that you will be able to check by using an item - Like a Watch!

### Body

Ok people this is my first tutorial so stick with me here ok??

I would just like to say that I am writing this for nubies but I somehow doubt if they will understand this so good luck to you all! I will not BORE you with the history of this thing so lets get right to it.

Fist off you should know how to use the following (If you don’t this tutorial may confuse you!!):

: Common events

: The Wait command

: How to change Variables and just knowing variables in general

: How Switches work and how to use them

: The cycle command

: Fork Options (I may call them loops sometimes but if I do I mean these things)

: The message command

NOW! On to the second part!

You need to create an item that will start everything off! I called mine the Hand-held Watch! What ever you call it, it should have these stats:

: Classification: SWTICH

: Price: 0

: Use number of times: LIMITLESS (.:IMPORTANT:.)

: Explanation: (WHAT EVER YOU WANT GOES HERE)

: ON Switch: [####]call time (the #’s are whatever the switch number is, and cal time is the name if the switch! I will call it this so I suggest you do as well)

: Available at: [X] Field [ ] Battle (I THINK THAT IS SELF EXPLANITORY!)

OK! If you want to be able to check the time from the moment you start the game I suggest you give it to him at the start of the game! The Price being zero will make the user unable to sell the watch!

ON TO STEP THREE (THE HARDEST ONE I THIK!)

Make a common event called “timer”. Make it a Parallel Process with no Appearance Conditions Switch (unless you are going to start and stop the time during the game at different points in the game!)

OK TO THE EVENTS!!!

Ok here is how this works! I will write how the code should look first, then I will explain everything incase the code you have is different! Just to note: you need to make 3 variables called seconds, minutes, and hours!! The #### in the variable parts is just whatever your variable number is for that variable!

STARTING NOW!

< > CYCLE

< > Wait: 1.0s

< > Variable Ch: [####: seconds] +, 1

< > FORK Optn: Varbl[####: seconds]-60

< > Variable Ch: [####: minutes] +, 1

< > Variable Ch: [####: seconds] Set, 0

< >

:END Case

< > FORK Optn: Varbl[####: minutes]-60

< > Variable Ch: [####: hours] +, 1

< > Variable Ch: [####: minutes] Set, 0

< >

:END Case

< >

:END Cycle

< >

OK SO WHAT DID THAT MEAN?!

Well I will go through the steps in point form ok?

: Make a cycle

: In the cycle (The rest of the steps are) Wait 1 second(s)

: Change the Variable [####: seconds] to + one meaning you want it to ADD 1 NOT CHANGE TO 1

: Make a FORK option and make its condition to variable: [####: seconds] 60, same

: (IN THE FORK OPTION) Change the Variable [####: minutes] to + one meaning you want it to ADD 1 NOT CHANGE TO 1

: (IN THE FORK OPTION) Change the Variable [####: seconds] to SET 0. SO YOU ARE SETTING SECONDS COUNTER BACK TO ZERO!

: BACK OUTSIDE THE FORK LOOP

: Make another FORK option and make its condition to variable: [####: minutes] 60, same

: (IN THE FORK OPTION) Change the Variable [####: hours] to + one meaning you want it to ADD 1 NOT CHANGE TO 1

: (IN THE FORK OPTION) Change the Variable [####: minutes] to SET 0. SO YOU ARE SETTING SECONDS COUNTER BACK TO ZERO!

THAT IS ALL FOR THAT COMMON EVENTNOW INTO THE NEXT

Now to make another common event that will actually SHOW you the time (using the watch)

Ok make another common event and call it “check time”, make it auto start, and set its Appearance Conditions Switch to: [####: call time] (hmm imagine that!)

CODING TIME!!!

< > Messg: You have been playing for

: :\v[WHATEVER THE HOURS VARIABLE NUMBER IS] hours \v[WHATEVER THE MINUTES : : :VARIABLE NUMBER IS] minutes & \v[WHATEVER THE SECONDS VARIABLE NUMBER IS] : :seconds \.\.\.\^

< > Change Switch: [####: call time]-OFF Set

< >

Ok so what did THAT all mean??

OK the \v[####] that is put there will show the value of the variable stated in the brackets. The \.\.\.\^ thing at the end will wait for about a second and then automatically press enter for you! (THAT IS OPTIONAL THOUGH!)

POINT FORM TIME!!

: Make a message with the following: “You have been playing for

\v[WHATEVER THE HOURS VARIABLE NUMBER IS] hours \v[WHATEVER THE MINUTES VARIABLE NUMBER IS] minutes & \v[WHATEVER THE SECONDS VARIABLE NUMBER IS] seconds \.\.\.\^”

: Change the Switch: [####: call time] to OFF

THAT IS BASICALLY IT!

If you run the game and use the watch you will see what this all does but I will sum it up since I am such a nice guy!

: THE CYCLE THAT IT IS IN WILL MAKE THIS COMMON REPEAT FOREVER (WITHOUT THE CYCLE THE COUNTER WOULD NOT WORK!)

: The game starts up and the counter automatically continues from where it left off

: The counter will add one to the seconds variable every second until it reaches 60

: Then it will be allowed to go into the minutes FORK option

: In this fork option it will add on to the minutes variable and reset the seconds counter

: (THIS WILL MAKE IT SO IT CANNOT GO INTO THIS FORK AGAIN UNTIL THE SECONDS COUNTER REACHES 60 AGAIN)

: When the minutes counter hits 60 the game will go into the second FORK option

: In THIS FORK option the game will add 1 to the hour counter and reset the minutes counter

: (THIS WILL MAKE IT SO IT CANNOT GO INTO THIS FORK AGAIN UNTIL THE MINUTES COUNTER REACHES 60 AGAIN)

: The Watch item you made will turn on a switch

: That switch being on will make the common event “check time” turn on and show you the time and then turn off the switch

And there you have it a counter for your game! I tried to be as through as humanly possible but if you have any questions or comments you can e-mail me at drunken_red@hotmail.com. I am working on other tutorials so look out for them as well.