# Gw Temp

## Tutorial - 'Yet Another Timepiece Event' by DrakoShade

An item about RPGMaker 2000 posted on

### Blurb

Another tutorial showing how you can implement real-time time tracking in your game.

### Body

Alright, people. I know there are several tutorials for this out there already, but I'm going to show you my method for keeping time. You will need to know the following in order to do this:

Common Events
Variables
Switches
Conditional Branches

That's really it. The tutorial isn't for total newbies, but it's so easy you'll be slapping yourself if you haven't figured it out already.

Step One:
Begin by setting up your variables. The number you'll need varies depending upon how you want your time to keep. In my case, I had the following list.

Real Seconds
Real Minutes
Real Hours
Game Minutes
Game Hours
Game Days
Game Months
Game Years

Yeah, I got specific. Probably all you'll want is the first six in your game. I'll only show you the basic process, not give you the code for the entire event. It involves nesting conditional branches.

>Wait 1.0 Sec
>Var [Real Seconds] +1
>Branch if [Real Seconds] is greater 60
>>Var [Real Minutes] +1
>>Var [Real Seconds] -60
>>Branch if [Real Minutes] is greater 60
>>>Var [Real Hours] +1
>>>Var [Real Minutes] -60
>>>
>>End
>>
>End

But wait, there's more. That only tells you how to take care of the real time you're taking track of. Here's the second part.

>Var [Game Minutes] +1
>Branch if [Game Minutes] is greater 60
>>Var [Game Hours] +1
>>Var [Game Minutes] -60
>>Branch if [Game Hours] is greater 24
>>>Var [Game Days] +1
>>>Var [Game Hours] -24
>>>
>>End
>>
>End

Okay, so now, if you have both those code snippits together within a looping common event, on Paralell Process, of course, then POW, you have six variables being manipulated.
You can have this event call other events at certain times, preferably by having these other events on Parallel Process and just having this one flip their trigger switch on. That works well with day/night systems.

Oh, by the way, if you want the player to be able to check the time any time they want, you could just do what I have. It involves another common event, this one also on parallel process. I have it set up to monitor for the player pressing the "+" button, and when he does, it brings up a text box displaying the time in the game world and how long he's been playing. Simple, and you can figure that code out for yourselves.

Don't bother accrediting me in your game if you use my time-counter. I just wanted to help out, and any code I post in a tutorial is free for anybody to use.

Should you REALLY need to contact me... well, post under this and I'll get back to you if I feel like it.