-
Timer 2D FPS
I am making a simple 2D FPS that displays a background structure that enemies will use for cover and randomly an enemy will lean around a corner (a bmp displayed of them leaning) and you have to shoot them. My question is how can I make a timer so if you dont shoot the enemy before the time runs out he will shoot you and as the game progresses the time before you are shot becomes shorter and shorter.
Thanks for all of your input.
-
is this windows or Console?
-
-
Then you can use the Timer function.
SetTimer to start it, it sends WM_TIMER messages on it time it hits a certain amount of time(under one configuration and IMO the easy way to do it), then you use Killtimer to stop it from sending the messages. For more info look up SetTimer, WM_TIMER and KillTimer on MSDN.
-