I’m creating a function in my Gameplay Ability System parent class that depends on active tags of a certain tag parent, in this case “char.boost”. Depending on the children present I want to execute different logic.
i.e: char.boost.cooldownReduction and char.boost.slow are active so I would only execute their respective nodes.
I currently have something like this but this can’t be the best way of doing this.
// Make tag container
FGameplayTagContainer Container = UGameplayTagsManager::Get().RequestGameplayTagChildren(ParentTag);
// Get tags as array
TArray<FGameplayTag> TagArray;
UBlueprintGameplayTagLibrary::BreakGameplayTagContainer(Container, TagArray);
// or like this
TArray<FGameplayTag> TagArray1 = Container.GetGameplayTagArray()
// iterate
for (const FGameplayTag& Tag : TagArray)
{
....
}