So I’ve read through the C++ files given to us by Epic after enabling GAS, and I’m trying to use them for inventory and UI in an RPG. The first two pictures are of the function that works for me, the third picture is the one that doesn’t work, but I want it to work and don’t understand how Query works. I hope this all makes sense I’m sorry in advance if it doesn’t.
My first picture is my current function. I get all actors that implement an interface that I made specifically for that actor class. The actor is a custom actor with no info in it other than I gave it an AbilitySystemComponent in C++ and 2 variables (Name, Asset Gameplay Tag) inside Blueprints. The NPC provides a list of available inventory items in the form of struct containing 1 Gameplay Tag and a float for random weight selection. That is ran through my own Blueprint Function Library function I wrote that just sorts it into an array of randomly selected tags. Back inside the NPC those tags are checked against the actor owned tags called by the GameplayTagAssetInterface and checked against any of the randomly passed in tags, if it matches any of the tags passed in, it offers the item for sale in a widget.
Second picture is Blueprint Function Library function
Third picture is the function I want to use. I don’t understand after reading so much how this Query works. I try to GetAllActorsOfClassTagQuery and make the tag query with the same tags, yet the actors it returns is 0.
How can I pull the object ref of this class using a Gameplay Tag Query?