I want to destroy a specified component

When the actor is damaged and Life runs out
There is a time lag until the actor is destroyed, but during that time
I want to destroy a component with a red mark, but it can not be destroyed.
How can I destroy it?

Shouldn’t the Destroy execution flow be hooked up to the Any Damage event - perhaps after AddScore? Right now you destroy this component when the actor is created (but you don’t since your life is most likely > 0 on Begin Play).

Thank you very much. The numerical value of Life is 1.
However, as you pointed out, if you set it to Destroycomponent of AnyDamage, an error log will appear.

This most likely happens because you keep receiving AnyDamage calls and this tries to destroy the component multiple times. Or the actor that owns this components gets destroyed.


Either check if the component isValid before destroying it or gate it with DoOnce node so it does not get re-triggered.


Essentially, when you destroy something, it does not get destroyed immediately. It’s put aside and flagged for destruction (pending kill), the Garbage Collection will come to pick it up soon. If you try to access it during that time, you’ll see the Access None error.

Thank you very much.
After setting IsVald, the components could be safely destroyed and the error log is no longer output.

Awesome, well done! Also, if you want the sound to keep playing even though the component has been destroyed, you can place a Sequence node before validation and connect 1st pin to Destroy and 2nd to Play Sound. Although this might be undesirable here.

Good luck with the rest!