I want the timer to start once the player presses 'Enter' but the timer starts right when the game starts. How do I do this?
Code:
[url]http://pastebin.com/XTT2EEmE[/url]
It's starting when the game loads because you're setting b when the game loads. You need to set it when you change the game state to Playing. Then, when the game is over, either stop setting a in the update loop or store the time. That way it "stops".
Late reply, sorry about that. How would I do this exactly?
I don't know how else to explain it without giving you the code.
[QUOTE=Ortzinator;33872592]It's starting when the game loads because you're setting b when the game loads. You need to set it when you change the game state to Playing. Then, when the game is over, either stop setting a in the update loop or store the time. That way it "stops".[/QUOTE]
Where else would I set b then? I've tried making a "function GameIsPlaying" and put it in there but it didn't work.
Wherever you transition into your gamestate. Line 4.
EDIT:
Oh F-Me I didn't check the post date. Someone rate me late.
Sorry, you need to Log In to post a reply to this thread.