Hia folks,
I'm basically trying to have a representation of time passing in a day with 2 sprites. 1 sprite (at the bottom) is a long line, 54px long with a gradient showing the stages of the day (dark blue, dark orange, orange,yellow, light blue, blue, dark blue again). A second sprite is basically a round object that I want to move across the gradient line as the day in the game goes by. I have several variables that count seconds/minutes/hours/days.
Basically, I want it so that every time the "hours" variable increases by 1, for the second sprite (the round object) to move to the right (or set position), along the gradient line by x amount of pixels.
The way that I count times is:
every 1 second add 10 to variable "seconds". Whenever the variable "seconds" reaches 60, it goes back to 0 and adds 1 to the variable "minutes" and starts counting again. When "minutes" reaches 60, it goes back to 0 and adds one to "hours". When "hours" reaches 24, it goes back to 0 and adds one to "days" variable.
Any ideas on how to achieve that? It may be something very simple, I'm just not seeing...