Pausing the game for a while?

This forum is currently in read-only mode.
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • Hi,

    Got a bit of a problem here and would appreciate some tips on how to continue.

    When the player dies in my little game, I want the game to stop responding to user input. I prevent this by using "player: Start ignoring user input".

    I then want to start a death animation on the player. Haven't checked this part yet.

    Then I want the game to pause for, let's say, 4 seconds.

    Then I want to resume again, reload the map, and start listening to user input again (done, and works just fine).

    So. How do I pause the game for some seconds?

    I tried to add a Start Loop and Stop Loop as subevents to the condition I want to check against, but they don't seem to pause the game at all (tried with 240 loops, (game running at 60fps) and 4000 (if the loop was run once every millisec))

    Cannot find anything else to use either, like a Delay event.

    Have anyone else done this before? Thankful for any help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • how about using a counter and when the player dies set the counter to say 100 or something and then have another event that always subtracts 1 as long as that counter is greater than 0 and one more event that will run only if the counter is 0 and if the player is dead so something like this:

    (note: for player dies, you can use a variable to track the status or something or some other means to identifying that the player has died)

    counter > 0

    :subtract 1

    player dies

    :set counter to 100

    counter = 0

    player dead

    : do whatever you want to do

  • Works like a charm! Thanks a lot.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)