Gameplay Tags not working

So I’m looking to making use of gameplay tags, I haven’t really used them before but seems like a great way to add logic that isn’t tied to a specific class.

Right now I’m working on my interaction system using a standard Interface setup. What I want to do is check if the actor I’m hitting has the tag “disabled” or not. It seemed very straight forward until I tested it and the check never returns true even when the hit actor has that tag.

I don’t understand why this is. Even if I put the tag in the tag container hard coded it doesn’t seem to work.

I’ve tried getting all the tags, looping thru them and so on but it never returns anything. Like you see in the picture below the tag does get set on the actor so I don’t get this.

Does anyone have any advice on this?


@Bobby_Rosehag
photo one shows that you are calling Has Matching Gameplay Tag from the tag asset interface. You will need to set that interface up in C++ or it will always return false.

Anytime you pull off an actor object reference and do something with a gameplay tag it will be through the (Tag Asset Interface) there are workarounds that will let you use the (Tag Libary) You could set up a blueprint interface that you can call on and it will return the actors tag container and then from that container you can run the same logic.

@Bobby_Rosehag an example about of the work around.

image
Create an interface


Implement the interface on the actor you want to track tags for.
Create a variable that is of type Gameplay Tag Container and pop it
into the return of the Interface function. You can add tags to this container
with the add gameplay tag function.


An example of how you can use that to run logic. just make sure you are using
a function that targets the Libary and not the Tag Asset Interface

I used to use this before switching to the asset interface. it has some limitations but I hope it helps you with your issue.