Game Over after dying

Get help using Construct 2

Post » Sun Feb 23, 2014 7:52 am

How can I have game over, a play again button and high scores, pop up as soon as the player dies. I want when my sprite hits an object an animation for the sprite is played then game over, play again, and high scores pop up.
B
6
S
1
Posts: 89
Reputation: 619

Post » Sun Feb 23, 2014 8:10 am

Simply add an extra top most layer, none transparent, set intially to invisible, holding those details.

Game over, score list, restart button.


Upon death, make the layer visible and do whatever else is needed. (like disabling controls)
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sun Feb 23, 2014 8:57 am

It's much easier making another layout.(That's if you don't want to make it transparent to see the death scene)
You won't have to disable the controls.
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sun Feb 23, 2014 10:48 am

Thanks guys, I tried both methods but the problem I'm running into is that, my collisions event for when my sprite dies is:

Sprite | Is overlapping TILEDFLOOR | Sytem | Go to layout "Start"

Sprite | Is overlapping Top Object | System | Go to layout "Start"

Sprite | Is overlapping Bottom Object | System | Go to layout "Start"

Sprite | Is outside layout | System | Go to "Start"

Now these are all individual events. But when I try to put, use an action under the first event to play a sound and wait couple seconds (using time scale) before seeing the game over overlay screen.. it just.. doesn't work :/
B
6
S
1
Posts: 89
Reputation: 619

Post » Sun Feb 23, 2014 10:56 am

event
Sprite | Is overlapping TILEDFLOOR

actions:
Play sound
wait x seconds,
Go to layout "Start"
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572


Return to How do I....?

Who is online

Users browsing this forum: 8tomo8, brunopalermo and 9 guests