[SOLVED] Projectiles with multiple enemies

I have multiple of the same enemy on the screen at the same time and have them set to fire at different times but both shots fire from one enemy. Im using “For each” but it doesn’t seem to read it. Is there something wrong in my code?

I would try removing the “Trigger Once” condition and making sure that the attack animation is not set to loop since you seem to be triggering based off of the frame of the animation… which is odd.
Are you sure all your droid instances are using the Attack animation?

It isn’t set to loop. the weird thing is, when the beam comes out at the wrong sprite it is clearly not the attack animation. one sprite goes into the attack animation and the other will shoot the laser while in the idle animation.
taking off trigger once just causes far too many instances to happen.
I might try hooking it to a timer. How do you suggest triggering an attack? Ive been using the animation for a while now.
(update: Ive now removed the spawn point for the beam in every animation that isnt “attack”. but it still appears on the non attacking sprite. )

I figured it out. it was in another part of my code, I didn’t realize it crossed over.
I had the beam set to continuously move to the player until it entered the animation in which it fired. But did not clarify that it followed to sprite that was in attack animation. so it was following the first instance. when I clarified, it solved itself.
Thanks for your help.

1 Like