Flash behavior & Inmmunity

0 favourites
  • 5 posts
  • Hello guys, here again with another question.

    In the game I am making, I have that whenever the Player is hit by an enemy it flashes during 1 second. The issue with this is that it happens easily with the flash behavior, but during the flash action, the Player can be hit again!

    Any ideas of how to implement somehow an inmmunity during the flash duration (in this case 1second)?

    I have the idea of using the event "Player | Is flashing" but I have no idea of how to implement this inmmunity....

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • okay, here we go.

    enemy hit player >> Player is " flash" in 1 second and can't be hit again during this time.

    Just write a code like this:

    Enemy overlapping Player

    Player is "flashing" (right click on "player is flashing" and click (invert))

    Invert mean the event only active when player isn't flashing :D, it'll solve your problem .


    I'm added some "Health number" for player, so you can see, when flashing player never lose his health, but when flash ended, he will be hit again.

  • Dude, I am starting to think you are stalking me, thanks a lot for the help you have given me! :D

    Just a question, whats the difference with overlapping and collision? In a way, you are using it in your example for the same, as I see it.

  • :)) No i'm not stalking you, if you in love with C2 and Community in here, i bet you will do the same, bro.

    And about the difference, you can find it's here :


  • I see....thanks for the link! It clear some doubts.

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