Right,... Very new to GS, just a quick Q from a newbie!
SaveDave
Member Posts: 140
I have a really good idea for my first game. I'm the head of a graphic design dept of a publishing company so as far as design goes, I have this sorted.... My problem arises with my game I am setting out to make......
Is it possible to have a single timer running throughout my game even though my game changes to new screens for each "mini game" so to speak?..
Basically I want to time how long it takes for someone to complete a sequence...
Any help would be appreciated....
Is it possible to have a single timer running throughout my game even though my game changes to new screens for each "mini game" so to speak?..
Basically I want to time how long it takes for someone to complete a sequence...
Any help would be appreciated....
Comments
EDIT: and it always runs even when you change scenes - it just keeps running until you close the app.
Create a real or integer attribute - Call it miniGameTimer or something
then with your handy dandy Timer Behavior:
Every 1 Seconds
miniGameTimer = miniGameTimer + whatever amount your using(ex. 0.1, 1, 0.01)
Ps. Sorry about the """"". It's the best way I can describe what I am trying to get across.
create an integer (if you are only concerned with full seconds) attribute called game.ClockOffset (or something like that).
Then in the button that starts the game or even just in the first scene have a behavior that says
change attribute game.ClockOffset to game.Time. Then All you need to do at anytime throughout the game is game.Time - game.ClockOffset and you will know how many seconds it has been since the person started the first scene.