Clock Faces for Variable Based Time Systems

Started by l0rdph0enix, August 02, 2011, 08:13:30 pm

Previous topic - Next topic

l0rdph0enix

I've been using variable based time systems for a bit now in my project and I came across a sprite someone made of the clock tower where it gave the illusion of time changing in both 3 hour increments and 15min increments. That's fine and dandy but I wanted to expand it to every hour in 5min increments. I first remade the clock tower with the hands moving according to the hour and minute. Then I realized "Hey wait! What if I want to put a clock face on buildings or trees or anywhere?" So I removed the tower from around the clock face but kept it lined up so I could shift the clock tower graphic in my tilesets over a few pixels and the face lines up perfectly. Since the shifting of the clock tower is the only change needed for tilesets and simple to do I won't put those here. I am putting the clock faces here and a very simple example of the event used.

'ClockFace': ShowHide

12:00

1:00

2:00

3:00

4:00

5:00

6:00

7:00

8:00

9:00

10:00

11:00



'ClockTower': ShowHide


1:00

2:00

3:00

4:00

5:00

6:00

7:00

8:00

9:00

10:00

11:00



'Event Example': ShowHide


Variables = 2
Conditional Branches = 24


Comment: A.M.
Comment: 12 o'clock
Conditional Branch: Variable [0001: Hours] == 12
  Conditional Branch: Variable [0002: Minutes] >= 0
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 2, 0
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 5
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 2, 1
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 10
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 2, 2
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 15
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 2, 3
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 20
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 4, 0
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 25
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 4, 1
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 30
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 4, 2
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 35
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 4, 3
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 40
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 6, 0
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 45
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 6, 1
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 50
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 6, 2
                         : $>Direction Fix ON
  Branch End
  Conditional Branch: Variable [0002: Minutes] >= 55
    Set Move Route: This event
                         : $>Direction Fix OFF
                         : $>Graphic: "Clockface_12', 0, 6, 3
                         : $>Direction Fix ON
  Branch End
Branch End


Continue on with this model for 1-11.


Now in my variable based time system the hours go from 1 - 24. So once the variable hits 13 - 24, 13 = Clockface_01, 14 = Clockface_02, and so on. Some of you might be wondering why the Conditional Branch for Minutes checks to see if the variable is greater than or equal 5, 10, 15, ... . Well that's simple I noticed when I first had it set so that it was equal to 5, 10, 15, ..., that when I went into a building and then came back out of the building or loaded a game the clock face didn't change until the minute variable had hit the next increment of 5. SO as long as the minute is greater then the initial increment of 5 before the next increment the clock adjust itself accordingly nearly seamlessly.

iRemilia


rayquaza1000

Hey, this is great, I'm totally using this!
*levels up*
Meow