Download

Destroy child actor

Hi

I am creating a small game in which you can shoot different projectiles with different effect as fire, electricity …

I created a Actor Class called “BP_Effect” which contain a particule system and a small script. When I touch a monster which a projectile, the monster will get the effect. (For exemple, the monster is hit by a fire projectile, the monster will be on fire).

In my “BP_Effect”, i have a timer. When the timer is over, I destroy the effect (child actor). The fact is that it work, but not too much …

The particle system and script are destroyed, but the monster still has an BP_Effect class child component…

I tried to use the function “destroy component” , but it does’tn work…

Here some screenshot, in the evening i will try to make a short video to show the problem.

HELP

Dude … it works ! Thanks a lot ! But i dont understand something.

I can only destroy a child component from his parent actor, i can’t from another class … check the screenshot.

I don’t understand why …