In Game Timer Pause Problems.

c0rupt3d

  • Posts: 53
Hey,
So in my current game, I have it say after 10 seconds change wave to 2. After 20 seconds change wave to 3. etc.

But if the player pauses the game it will still add onto the in game timer, SO I added after 10 seconds + time game has been paused. ( which I made a timer for how long the game has been paused ) but no luck.

Any Simple ideas?




acarnivorousocean

  • Posts: 194
Instead of using (Do After x Seconds), try creating a Number Attribute called Game Timer (or whatever you want).

Initialize Game Timer to have a value of 0.

Now, set up a (Do Every 1 Second) block:
   If [not paused]
Increment [Game Timer] by 1.

This means that the timer will not go up while the game is paused. :)

Now you can set up your waves to come in once Game Timer = whatever number you choose.

c0rupt3d

  • Posts: 53
Yes, I have a timer in there at the moment that doesn't increment on pause seen in the first screenshot.

Hm the problem was it was looping that way spawning endless enemies instead of one but just tried something different adding in a boolean attribute for each wave and if has spawned.

Fixed it up for now thanks.

« Last Edit: March 05, 2014, 09:58:50 pm by c0rupt3d »