Get enemy to stop moving after death

I’ve got It set up so the enemy which has force applied to it and it’s going back and fourth between to hidden objects. When my bullet hits it, it triggers the death animation but it keeps moving while dying. I tried “stop the object” action but it only stops while the bullet is actually touching it and once it passes through it continues moving. So I guess I need to know how to stop both the enemy AND the bullet ?

When you apply the force that moves the enemy, add a condition that checks the animation is not the death animation.

I think I know what you mean, but I’m not sure how to find that in the actions

Hi UltraHeroes, look for it in conditions, not actions
You can use Current animation not equal to, or as shown here Current animation name is, and invert the condition

1 Like

I’m having trouble getting that to work. Would that be a sub condition of where I set up the enemy and put the force on it?

Use it in the event that applies the force.

What is happening probably is that while the bullet is touching the enemy, the force is being applied, but the “stop object” is negating it. As soon as the bullet stops touching it, the force is applied once again without anything nullifying it.

Add a condition when you apply the force (if the animation is not the death animation → apply force).

i guess i’m having trouble figuring out exactly how to do that. I’ve tried multiple ways to remove the force from the “dead” animation but still not working. These are two ways i’ve tried it

Your problem is that the checking to animation != 1 or animation = “Dead” is that it’s only done once at the start of the scene, and all other events are executed all the time, regardless of the animation of Enemy1.

To fix this, you need to change the position of your events :

  1. Event 1 is a sub-event and needs to be dragged to the left so it’s in line with it’s parent event.
  2. Events 2-5 need to be dragged right so they become children of event 1

YESSS!!! Makes so much sense!