Is Overlapping vs On Collision?

0 favourites
  • 5 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi there!

    I have a problem with both "Is Overlapping" and "On Collision" and here's why.

    I have a bomb with two different animations. In the first animation you see the bomb and in the second animation you see the explosion. So, when the first animation is finished, the second animation starts.

    The bomb is suppose to subtract 1 from enemy when the enemy is hit by the bomb, but only if it's hit when the explosion animation is playing. The enemy has to be hit 3 times before it dies.

    The enemy is walking from side to side. If I use "On Collision" and the enemy is overlapping the bomb while the first animation is playing, then it doesn't subtract 1 from enemy when the second animation (explosion) is playing because there's no collision since it's already overlapping the bomb.

    If I use "Is Overlapping" then it subtracts 1 from enemy for as long as the enemy is overlapping the explosion, meaning the enemy dies immediately by only 1 hit.

    So, what to do? Is there a way to make sure that it only subtract 1 from enemy once while overlapping? If you don't understand what I mean, I can make a video to show you.

    Thanks in advance,

    Tommy / tomologames.com

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What if you did

    On animation 1 finished > play animation 2

    ------Is overlapping enemy > subtract 1 health from enemy

    That way, it would only check for overlap the moment animation 2 starts

    You could also keep your On Collision with event so that enemies who collide with the explosion after it has initially begun are also damaged

  • Thanks Boss! It works great when I use both "Is Overlapping" and "On Collision" when I set it up that way :)

  • You don't need to check Twice for Collisions (On Collision & Is Overlapping)

    You can do just 3 Conditions Together:

    Bomb is Playing Animation2

    Enemy Is Overlapping Bomb

    Trigger Once While True

    ===========================Action Substract 1 From Enemy Life

  • Thank you Boss! "Trigger once while true" was what I originally was looking for when I created this thread :)

    Thanks to both of you again, it's very kind of you to take the time and help me out and I really appreciate it :)

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