Working with gameplay tags

Hey!

So I wanted to get into Gameplay Tags using blueprints, but after a thorough search of the tutorials and so, I’m convinced it’s super hard to expose them to blueprints using the gamplay tags container working as a defoult container on EVERY actor. I need to manually make a variable “gampleay tag container structure”, and only then it works.

But then I can only access it via the said variable, meaning I need to cast to the actor… And that makes the whole thing way less usefull.

Like, I can’t get the gameplay container out of the line trace hit result. And it sucks…

Here is how you do it. In the viewport click on a actor, then in the search bar of the details panel type in tag, under actor you can add a tag and name it whatever you want. Now when something hits this actor you want to identify the tag name here is how you do it. For break hit result on the output “Hit actor” get “tag” then GET a copy array then print the string! For event hit on the output other do the same thing as before!!

You can also use this method for AI teams for when you use either pawn sensing or perception you can use a node called “actor has tag” then type in the tag in the box and if the actor has tag is true then chase the actor. BOOM!!

It is very easy to do. The YouTube tutorials on this topic are absolutely horrible and make it look hard.

Good luck with Unreal!!

Also you do not need to use variable for this.

But you’re talking abut Actor Tags. And it’s a completely diffrent thing. See this video: WTF Is? Gameplay Tags in Unreal Engine 4 ( UE4 ) - YouTube

But I did manage to make it work, but not the way Epic intended.

What you need to do is:

Create a blueprint interface, with a function called “Get Gameplay Tags” or something like that. And add a finish node with an exposed variable called “GameplayTagsContainer”

Implement that interface as high in the parent class actors as you want, for the ease of inheriting the setup.

In that parent class, set the variable type “Gameplay Tags Container” called whatever “GameplayTags” for example. Get into the function form the interface and plug your gameplay tags container into the finish node of the function.

Ten, you can call that function from other blueprints and use gameplay tags functions.