How do I add "Game Over" when game is lost?

Get help using Construct 2

Post » Thu Sep 20, 2012 6:48 pm

Hey!

Ok, so the title pretty much says it, but I'm wondering how I can make a big "Game Over" text pop up when the player in my game is shot? I know how to make text and change fonts, size, colour etc. I'm very new to this, and this exact question may already exist, but I couldn't find it anywhere.

So my game is basically a spaceship shooting other spaceships. When the other spaceships collide with your spaceship, you lose. Pretty simple. I'm doing a media course in school and our task was basically to make a simple came with Construct 2, so yea.

I'd really appreciate it if anyone could tell me how to do it. Thanks.
B
1
Posts: 2
Reputation: 229

Post » Thu Sep 20, 2012 7:35 pm

Hey Linnea,

Thats a fairly easy thing to do once you have your head around the basic concepts. Its like if you were explaining your idea to a friend, you need to tell the game all the same rules.

When your spaceship hits a bullet you could have a simple event like : Spaceship On Collision with bullet -> Spaceship, destroy.    

If you want your Spaceship to have to health - you need a way to track that health. Add an instance variable (to the player object) or a global variable to keep record.

Now that same event above might look something more like :
Spaceship On Collision with bullet -> Spaceship, subtract 1 from health.

If you have created a game over sign and werent going to have health then maybe something like:

Spaceship On Collision with bullet -> Spaceship, destroy.
                                         -> Create Game over Sprite at X,Y.GenkiGenga2012-09-20 19:37:44
ImageImage
B
72
S
16
G
6
Posts: 1,038
Reputation: 10,448

Post » Thu Sep 20, 2012 7:46 pm

Alternatively, set the 'Game Over' object as invisible and position it where you want it to appear on the layout.

On start of layout -> Set 'Game Over' Invisble

Spaceship On Collision with bullet -> Spaceship - destroy.
                                   -> Set 'Game Over' Visible
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Fri Sep 21, 2012 8:26 am

Thank you guys so much! That was very helpful.
B
1
Posts: 2
Reputation: 229


Return to How do I....?

Who is online

Users browsing this forum: CavalierBubble, imnotspecial, tomi71, totoe and 22 guests