Help, please. Animation issue (Solved)

On the Scene titled “Ape Out Level”. When I shoot an enemy, only the first enemy dies and changes its animation to “Dead”. I also have some other issues, but those are written in the events sections as comments if your interested.

Please, this is so frustrating. Like 3 hours just trying to get the animation to play and death counter to go down

Won’t let me upload the zip file.

Most of the time when characters die they are deleted. Yours are not. That’s fine but the issue is the is dead condition doesn’t just trigger once like button was released The is dead returns true on each frame as long as the object is dead.

The way trigger once works is the condition needs to go from true back to false and then true again to trigger the action again. It’s like a door. You can only open a door once. To open it a second time, you need to close it first and then reopen it.

The trigger once works on the object not just one instance. So, as long as 1 instance is dead, it’s not going to trigger again.

There are many ways around this.
Delete the object, no object then nothing to return is dead So, the trigger once is cleared and ready for the next death.

Or Delete the object and replace it with a different object in its place. So, it no longer triggers the is dead because it would just be a different object. Different object entirely not an instance.

Or Add another condition that’s the opposite of what the action is changing either by inverting the condition or using another value or changing = to ≠

Meaning, if the action changes the animation to “dead” you can add the additional condition of animation≠"dead". So, it only triggers if the object is dead and the animation doesn’t equal “dead”

If the is dead changed a variable then you could use

Object is dead
Variable of object is false

Change variable of object to true

That would do the same thing. It’s filtering out the object that is true by only picking the objects that are false. This creates a sort of instance based trigger once.

When possible, I would prefer the delete or delete and replace. It’s more efficient to only have to search through an object list of living objects with 1 dead than to sort through living objects and multiple previously dead which then need to be further gone through with another condition to choose the one with a certain animation or object variable.

There may still be other issues but these seem to be the clearest. If multiple objects can die, you may need a for each objector other strategy to handle it.


That solved the issue, thank you. What do I do with this post now?

If your curious I created “Corpse” at object center. Then I duplicated the first frame 40 times and added the “Flower” animation at the end. I run that at 4 fps and the corpse stays for 10 seconds before becoming a flower. No need for an object timer.

1 Like

Good to hear. You can click the pencil near the post title and add [solved]

1 Like