Problem executing death events for every separate sprite[Solved]

Well, I made some enemies and they work fine. There attacks go well, there movement is good and there animations are nice. The problem is that when, although if one dies, it dies according to the events. But if more than one dies at the same time, only one dies, and then the other never dies. In fact, all instances of that enemy never die since the condition for the trigger once is always true.

I am not using the repeat every X seconds thing because what if I need to put several actions for a death scene, having the wait command in between them, or something having a tween for a death. I’ll have to wait for one enemy to die before the other does.
So, any help?

Change this event:

  1. Remove the “Trigger once”. It’s unnecessary as the WingDing is being deleted and won’t be around in the next frame.
  2. Add a “Repeat for each WingDing Object” event as a subevent of this one and move all those actions into that.
  3. Create the DeathParticle frst, then delete the WingDing. And don’t change the health of the WingDing - it doesn’t exist and may cause an error.

I think that should solve your problem.

1 Like

Yep, the repeat for each object thing was what I needed. Thanks.