Enabling Post-Hit Invincibility?

Get help using Construct 2

Post » Fri Aug 01, 2014 9:04 pm

I have an Autorunner game and i wanted to add a post-hit invincibility feature to the game.

I've got currently got obstacles in my game that you need to avoid and if you touch the obstacle, your health decreases by 30 (full health is 90). I've added Flash behaviour to my player so that when you collide with the obstacle, the player flashes.

I'm struggling to input post-hit invincibility into the game, i don't know how to go about it.

What i've tried is creating an event where if the player is flashing and they collide with an obstacle, then it adds 30 to the player's health to counteract the players health descreasing (hope that makes sense).

I've provided a capx i quickly made that show what i''ve done, hope someone can help.

Thanks
You do not have the required permissions to view the files attached to this post.
Image ImageImage
B
7
S
2
G
1
Posts: 93
Reputation: 1,243

Post » Fri Aug 01, 2014 10:14 pm

I have the same problem time ago, It's really simple in your event :
-player on collision with sprite
you just have to add another condition
- player is flashing
then use right click and select invert
so when your player is not flashing and collides with the obstacle it will dealt damage
and if it's still falshing it will not do damage :)
B
9
S
2
G
2
Posts: 10
Reputation: 979

Post » Sat Aug 02, 2014 2:19 pm

That was so simple and works great. Thanks :)
Image ImageImage
B
7
S
2
G
1
Posts: 93
Reputation: 1,243


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 7 guests