#How do I get something to happen for only the specific instance?

4 messages · Page 1 of 1 (latest)

quaint geyser
#

I have enemys that i want to have a damage animation play when they take damage. The enemy is a seperate scene that gets added in through instantiate in code. When the enemy gets attacked all the enemies play the animation. How do I fix this?

crisp mason
#

I'm not seeing anything that would cause that behavior. According to the output, only one health variable is decreasing.

(might want to use a timer and flag to add iframes, but that's a separate point.)

I'd also look at update health, and make sure you aren't calling any animations there. (since its not shown here,)Check if the same thing happens if you place two enemies in the scene manually, in which case it might be the spawning code.

quaint geyser
#

it still happens when i manually add them

#

and it's not being called in update health