Creating Game Over screen & Total Distance Score?

Get help using Construct 2

Post » Thu Mar 27, 2014 3:39 pm

Hi,

I'm making a Endless runner game (similar to the Autorunner template) and i'm having trouble creating a Game Over screen that displays the players score (Total Distance). I've managed to create a Game Over screen through another layout and when the player falls, it displays that screen, which is OK. But i wanted to create a Game Over screen as soon as the player falls on the Game layout itself rather than switching to a different screen, like Flappy Bird when you fall or crash (Hope thats clear).

Is this possible? If so, can any help suggesting how?

Also, like the Autorunner template, i have a total distance score on the actual game, but have no idea how to display the final distance once the player dies. I want to implement this on the Game Over screen too, so i'd really appriciate if someone could help out on that also.

As stated before, my game is similar to the Autorunner template, so if you can use that as an example for creating a Game Over screen and the Total Distance score that would be really helpful.

Thanks.
Image ImageImage
B
7
S
2
G
1
Posts: 91
Reputation: 1,239

Post » Thu Mar 27, 2014 3:54 pm

Something like this:
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Thu Mar 27, 2014 3:59 pm

The basic idea is pretty simple..
You could either create the game over screen through events or create it on an layer set to invisible on start of layout.
Then when game over happens set the layer to visible or create the objects needed for it.

For the total distance you could just create a text object displaying it on the game over screen. Maybe it would be better to add a new global variable Highscore and set it to the total distance after the run if the distance is higher than the total distance of previous runs.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Mar 27, 2014 4:37 pm

Thank you both for the replies. I'll try out your suggestions and hopefully it should work how i want it to.

shirokuma - Thanks for the file, really helpful but i doubt i will use that game over message :)
Image ImageImage
B
7
S
2
G
1
Posts: 91
Reputation: 1,239

Post » Thu Mar 27, 2014 4:41 pm

@rayray - Yeah, it's probably a little too abusive. Of course maybe that's a new game genre.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Thu Apr 03, 2014 3:16 pm

I've tried using the capx file to implement a game over score but the score seems to remains 0 all the time, i can change the text but the score always remains 0. The other issue is that game over screen is on another layer, which is not what i'm look for. What i wanted was as soon as the player falls off the screen, the screen stops moving and a game over appears, along with a message stating the score and a retry button.

@LittleStain - I've tried your method of creating the Game Over and Retry logos on another layer and set to invisible. Then, in the event sheet, i made it so that as soon as the player falls, this layer is set to visible. The problem there is that because i set the Retry button to restart the game layer, as soon as i touch the area where the Retry button is during the game, the game restarts as its invisible.

Could you go in to more detail on how its done please? I'm also interested in creating a highscore as you suggested but don't know how to go about it so if you can provide details on that then that would be appriciate.

I'm still just a beginner on this so i apologise if i seem like a complete noob :)
Image ImageImage
B
7
S
2
G
1
Posts: 91
Reputation: 1,239


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests