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

Get help using Construct 2

Post » Thu May 05, 2016 5:10 pm

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?
Posts: 1
Reputation: 177

Post » Sat May 07, 2016 4:08 am

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.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: (use Chrome on Windows for best performance)

My sites:
Posts: 411
Reputation: 8,469

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests