Enabling Post-Hit Invincibility?

0 favourites
  • 3 posts
From the Asset Store
We present to you “Post Apocalyptic Trailer” – our newest hard hitting, bass rumbling designed movie trailer collection.
  • 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

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That was so simple and works great. Thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)