How do I pause the game and add a death animation?

0 favourites
  • 2 posts
From the Asset Store
Add SubRip (SRT) subtitles to your videos in Construct 3
  • For a while now I have been trying different things trying to find a solution. After researching a lot, I didn't seem to find the answers I needed.

    So what I basically want to happen is when my player collides with an enemy, everything will then pause and the player's death animation will play. I found out that the commands for the players movement animation interferes with the death animation being able to play, but removing the players movement animation will prevent the player from having a decent movement. Leaving the players animation as it is, when the game is paused the player can still change the direction it's facing (without the death animation).

    How do I change this so that the player animation stays the same, but then when he collides with the enemy everything around the player stops and his death animation plays?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I assume you are pausing with timescale setting to 0 and set object timescale for player object to 1.

    In the event sheet, what you wanna do is to create a global variable "pause". When you pause, set "pause" to 1, and 0 when unpause. You will then add additional condition "if pause = 0" for all player's input. This is for normal game pause.

    Now, for when the player dies, create another global variable "deathpause". Set it to 1 when player dies. Adds this variable as another conditional check "deathpause = 0" to all appropriate places such as when the player sprite might change animation (This is all up to your game.). This is so the animation won't change if player is already dead. Also, dont forget to set "deathpause" back to 0 when the player respawns.

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