UE4 I want object to explode only once when hit

Hi, I am learning Unreal, I have made an object explode when a projectile hits it. (Its a skeletal mesh with an associated anim file I made in Maya) The problem is if I shoot the object again it will explode again. Its not that the animation file is looping, because its not looping. But it will play again if struck again.

Can anyone advise how I can make it explode only once when it is struck by projectile and not a second time.
So far its a really simple Blue Print, but I guess I will need to add something else to it.

There’s a node literally called “Do Once”, I think it could help :slight_smile:

I think this could be a state issue. It could be that the exploding object is still read as being able to explode on hit. I’m in no way an expert on blueprint stuff, but from seeing some of our design blueprints I think you need to replace the object actor with one that can’t be shot after the animation is complete.

Thanks Chris. I couldn’t get the “Do Once” to work for me. But I did find the “Set Collision Enabled” this seemed to do the trick.

another simple way to do this would be to just have a boolean parameter “IsExploded” or similar and set that to true after the animation has started and do a branch on the hit with the animation only playing if “IsExploded” is false.

This is a bit more of a code-like solution and means you don’t have to turn off collisions and can also allow you to query if the actor has exploded easier in future if you need to.

You could also use the gate note. Gates are a smoother solution than booleans imo. And you can open the gate later on, if desired.