Download

Component not Destroyed

Iam passing a variable back to the character BP where I want to destroy the component. I can see the variable has a value (from print) but it does not destroy it. If I do the destroy from where the mesh is created and I where I’ve updated the variable however it does destroy it.

I can’t see why it would make a difference as a print shows the variable to have the same content yet it only destroys from the skeletal mesh BP not the character BP.

Am not sure how to get this working, any suggestions?

capt1.JPG

capt2.JPG

capt.png

I just did a get all actors of class and a destroy and that worked and also tested when I added a tag to a placed mesh and could do a get all actors with tag and it also did the destroy.

However these are not proper solutions for when I spawn in multiple meshes they may need to be destroyed.

You can only destroy components that belong to the class you’re calling the “Destroy” on (check out the “DestroyComponent” node tooltip).

That’s why your component doesn’t get destroyed because if I’m correct the component is in “falchion_weapon_BP” and you’re destroying it from “xufu_character_bp”.

The solution here is simply to call an event on “falchion_weapon_bp” that destroys the component wanted.