Get Rid Of A Gamover Glitch

Get help using Construct 2

Post » Tue Apr 02, 2013 8:51 pm

So I tried to make cheats using the cheats tutorial - specifically a cheat that would give the player 1 life (whereas he starts out with 6) - but whenever I hit an enemy or fall down a pit, I get a gameover: even though the cheat is not activated.

I deleted the cheatbox from the project and the layer, and now whenever I fall down pits, I get a gameover. But only rarely when I get hit by enemies; other times, I just lose a life.

There are also times when I start up my game and the game over screen appears. I don't know what is going on, but, my game is completed and I'm not sure how to tackle this glitch.

B
10
S
4
G
3
Posts: 210
Reputation: 5,273

Post » Thu Apr 04, 2013 1:24 am

Tested the game again and the same problem persists. There shouldn't be anything in the game causing this because I have a health global verable and gameover only happens when health = 0. Enemies only take away 1 health, so why are pits causing me to get a gameover?nickkname2013-04-04 01:25:41
B
10
S
4
G
3
Posts: 210
Reputation: 5,273

Post » Thu Apr 04, 2013 1:46 am

Did any cheat operation lingers even though you disabled cheats? I can double check that for you if you show the events.
B
19
S
6
G
1
Posts: 116
Reputation: 2,730

Post » Thu Apr 04, 2013 3:45 am

[QUOTE=rosareven] Did any cheat operation lingers even though you disabled cheats? I can double check that for you if you show the events.[/QUOTE]

I don't know what you mean, but here you go:

Title screen where cheats were created:


Level 1:
B
10
S
4
G
3
Posts: 210
Reputation: 5,273

Post » Thu Apr 04, 2013 2:00 pm

I assume event 4 is your player falling down the pit. It restarts after 0.5 seconds and for those 0.5 seconds your player is outside the layout and losing 1 health every tick.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Thu Apr 04, 2013 4:32 pm

Yeah, if your pit leads outside the layout then the player is going to continuously lose health non-stop, instead of subtracting 1 only once. You might want to relocate the player's coordinates immediately just so that won't happen.
B
19
S
6
G
1
Posts: 116
Reputation: 2,730

Post » Thu Apr 04, 2013 6:34 pm

Thanks everyone, glitch is fixed :)
B
10
S
4
G
3
Posts: 210
Reputation: 5,273

Post » Fri Apr 05, 2013 3:45 am

or set the even where the health is removed to only trigger once.
B
22
S
5
G
1
Posts: 81
Reputation: 2,271


Return to How do I....?

Who is online

Users browsing this forum: spacedoubt and 3 guests