[SOLVED]Reset detect collision

0 favourites
  • 7 posts
  • I had problem with the collision between my player and a monster. Using "on collision with... " my player take damage in the first contact, but if I leave the player over the monster, the player don't take more damage unless I separate him and make it collide again. There is a form of trigger the collision every tick?

    And I'm new here. The program is the most easy and intuitive I ever seen. Really fun at end of the day!

    EDIT: I forgot say it, sorry: the monster had the "SOLID" behaviour. The hero the platform one.

  • What you want is the condition "Is overlapping another object".

    The rule for conditions in C2 is those with green arrows are triggered only once when they occur, whereas those without arrows are triggered perpetually while that condition is true (you can also modify that with the system condition "Trigger once while true").

    Welcome to the forums! I'm also pretty new here but am already finding it to be a very informative place.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If Player is Overlaping Monster

    System Every tick(Or Every X Seconds)

        Player.life - 1

  • Wow, so fast reply! The tip about the green arrow is so useful, thanks.

    The "Is overlapping ... " not work for this situation because the monster ( I forgot say it, sorry) had the "SOLID" behaviour. The hero the platform one. So must be another solution...

  • Well: My first idea for one solution: "Put an zone around the player using overlapping for the monsters, lava pits, spikes..." but if somebody had a better one, please say it!

    And thanks for the welcome GeometriX

  • There is also an "Overlapping at offset" condition. You could add this in and say "If at 4 or -4" to check a few pixels to the left or right. This way when the player runs into the solid you are actually checking a few pixels past the payer.

    More info on this in the manual

  • Boolean, I didn't notice that condition, really useful, thanks you!

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