Custom game-over screen

Get help using Construct 2

Post » Wed Nov 14, 2012 2:16 pm

I'm currently tasked with the creation of a simple Christmas themed horizontal shooter game as means of marketing a few online stores.

The player will have to collect a number of parcels and avoid nasty gremlins as well as trees.

Every 8 parcels players will receive a new voucher which is only shown to them if they either lose or win the game.

The game logic works great so far and I made sure that parcels are randomly generated. There's also a Christmas star that, when catched, will award a single extra life. Here's the thing though: How do present the player with a custom game-over screen?

Let's say the gremlins caught him at 8 parcels. He should, obviously, get to another game-over screen than those who made it to 16 parcels.

Is there any way to define this?

Like: if player collides with gremlin = destroy player
if playerscore 8 = go to layout GameOver1
if playerscore 16 = go to layout GameOver2

Posts: 206
Reputation: 1,685

Post » Wed Nov 14, 2012 2:28 pm

[code]+ if playerscore < 8
--> go to layout GameOver0
+ if 8 =< playerscore =< 15
--> go to layout GameOver1
+ if playerscore => 16
--> go to layout GameOver2[/code]

... where 'playerscore' is a global variable. For the second condition you can use the System condition "Is between values".
Posts: 305
Reputation: 8,479

Post » Wed Nov 14, 2012 3:11 pm

But how do I connect this with the gremlins/player defeat?

I figure I'll have to use a On destroyed event for the player character. But what then?

EDIT: Ok. I think I got it now.
It's somewhat hackish but should do it for now.

I created a new layout to which players will be moved upon defeat. From there, I set up the events the way you said. Blinx1232012-11-14 15:22:59
Posts: 206
Reputation: 1,685

Return to How do I....?

Who is online

Users browsing this forum: bmvillmow, farfetchd83, lainshi, MrWhizm, nav, RazHarmy, Yahoo [Bot] and 5 guests