Destroy Actor

I am spawning a targeting reticle onto an actor however, when the actor(monster) dies, the reticle stays in the world. I can clear the reticle if i press the input key to destroy the actor but when the actor(monster) dies, he is not destroying it and it just stays in the world until i manually activate it. I am getting an error of Is not valid when i attempt to access a validated GET variable of type BP_TargetMarker which is my reticle BP.

I tried to cast to my playercharacter BP and then executing the function i have from my MonsterAIController BP but no dice. That is when i get the issue accessing the validated get variable above. Not sure if any one has any ideas of what i could try to do to get the monsterAIController to destroy the actor upon death.



are you ever setting the Target Marker ?

So i pseudo fixed it. I made a new custom event and set it to multicast and called the end target function that destroys the target marker…however the GET TargetMarker variable still comes back as Not Valid per my print string indicated above.

you’re… creating a hud element… via the server? o.O

Creating a reticle actor and attaching to my monster actor. Here is the function i use to do this. This function is built into my main character BP

Attaching an actor in the world for that doesn’t seem like the way most would go about that. I don’t know if you have some odd requirement that has you putting that in the world, rather than just drawing it on the HUD… but i think that’s what most people would do, is just draw it on the HUD of the person looking at it.

Just trying to do a tab type targeting system where i can select each mob within a range and then draw something on them showing that they are targeted. It’s working as expected now but just have that one error. I am wanting to use a homing system where no matter what spell/projectile i cast it will find the monster.

Resolution

I just had to replicate the variable so the server had the information. Issue resolved.