Hello, I’m making Environment Query that my AI will use when selecting where to hide. So I have already implemented functionality that looks for wall and marks them for AI as suitable covers. In my querry I would like to give greater score to covers that are let’s say indestructible or are tall enough to grant AI protection while it stands.
My first idea was to give each cover bool variables like “isDestructible” or “isTall”, but I can’t see any test that allows me to check for value of given variable.
Instead, I can see test checking for gameplay tag, but apparently this is something different than just ordinary tag attached to actors and components, because it shows me something like an empty list that seems to be “to declare somewhere else”. I looked for tags in project settings thinking that they would be working like tags in unity, but found nothing.
Also would be interested in hearing a response on this; I’m trying to use an EQS query for a turret that searches for actors with the “enemy” tag attached so that it can find the closest target enemy.
Not sure you’re still looking for this, but in case someone else stumbles unto this page like me, I think I have figured at least a way to do it, if not THE way to do it.
To declare gameplay tags, add the following:
[GameplayTags]
ImportTagsFromConfig=true
To DefaultEngine.ini
Then, in editor, you will have a new category GamePlayTags in Edit/Project Settings/Project and there you can declare your gameplay tags.
To use it in EQS then, it is necessary that the objects you’re looking for implement the interface IGameplayTagAssetInterface.
To my knowledge, it is only possible to do it in C++ at this time.
Don’t forget to add GameplayTags to the PublicDependencyModuleNames in your project build.cs file for your project to compile.
For example, I wanted to use this for my characters, so I needed to create a MyCharacter class implementing this interface and have my character BP classes deriving from it. In the class implementation, there are 4 functions to override and that’s it. It’s not difficult to do, just a little difficult to find what to do since there is not much information about it.
Feel free to ask if this is not clear and you need more explanation about how to do it. If anyone has more information or if I’ve missed something, feel free to correct me too
Hey , thanks for the info! I was mistakenly thinking that “Gameplay tags” referred to the tags that you assign to actors, I had no idea about the tag system you referred to. I’ll try it out and let you know if I have any other questions.
MyTagContainer is a FGameplayTagContainer defined in my c++ character class and used in the implemented functions from interface IGameplayTagAssetInterface