Change animation on collision

I have a sprite that contains an explosion animation that I want to play whenever it comes in contact with an enemy bullet and then delete itself. my problem is the explosion animation never plays it simply destroys the object

(part 1):
player is in collison with bullet —> set animation “name” [the setup does play the animation, but it does not destroy the obj]

(part 2) the moment I add destroy object after the animation “name” the animation never plays, but the object does get destroyed

how do I get the animation to play in its entirety and the destroy itself versus having one or the other happen??

How you do that?
I think you start the animation and delete the object at the same time.
You can use the “Current frame” condition with a number lower than the explosion has frames, to delete the object.

(solution)

on collision => set animation
when the animation is finished => delete the object

  • thanks for the help :+1: