[SOLVED] Enemy wouldn't play it's sound

Hello, i’m having trouble making enemy for my game. The enemy when attacked by the player will change from idle animation to dying animation and play it’s death sound then get deleted. But when i copy and paste the enemy, the second enemy wouldn’t play the death sound if the first enemy hasn’t been deleted yet. Here’s my code:

Can someone help me? Any help would be appreciated

Right click on events and choose add and for each object instance

Select your object in it and move animation check condition there and play sound to action there

So it is checking each enemy object and not just one

Like this?

it still doesn’t work

Does your enemies enter death animation at all?
Like each of them?
Cause if not then you need For Each for checking health variable being equal or below 0

Also do not use play sound on channel for sounds
General rule

For playing sounds you use Play Sound action
For playing music you use Play Sound on Channel
NEVER use Play Music action

Yes, all enemies play a death animation when attacked, but only the first enemy to die plays the sound.

And each of that enemies is enemytest object?
Also try removing trigger once from checking if enemy is death animation and add condition to it frame number = 0

1 Like

IT WORKED! I tried your advice with removing trigger once and add frame = 0, but the sound keep looping until the animation hit frame 0, so add trigger once again and now all instance of enemytest play their sound. Thank you so much for the help!

1 Like