Removing Actor Tags in Game

Greetings.

Is there any way to remove actor tags in game via blueprint? For example, If I have an enemy that has the tag “enemy” is it possible to remove the tag once the enemy is killed?

Tags array varable in actor classes is exposed direcly to blueprint

AActor | Unreal Engine Documentation (Search for “Tags” you can see blue note icon which means it exposed to blueprint)

Actor class is related to all actors so you can access varable either from Verable tab somehow (i’m not blueprint user really and i can’t turn on editor right now, there should be option to include inherent varables from parent classes, try to search) or from “Self” node. To access varbale direcly from object node (like “Self”) drag a object pin link and drop it in empty space, in context menu go to “Varables” categoty and there you should have all Set and Get of object varables, and search for “Get Tags”.

Once you gain access to Tags array, you simply remove tag from that array :slight_smile: you can also add tags by adding them to that array

1 Like

Hi !

I’m afraid I don’t exactly get what you are meaning. When ever you get the chance, could you maybe post an image of an example.

thanks.

What you don’t understand?

Get a reference to your enemy wherever you are killing it(if it is the enemy BP itself then just right click in event graph > Get Tags, if it is the AI Controller or some other BP drag from the actor reference and Get Tags.) Then you can use either one of those nodes in the screenshot to remove a tag from that array:

66617-removetag.jpg

3 Likes

I didn’t understand your node setup, but it’s alright now :slight_smile:

Thanks this is what I needed.

Thank you, it worked

Thank you! I have troubles with arrays, but it’s really simple solution