I would like to get a list of the granted Abilities on a Character from tags if possible.
I tried to edit the AbilitySystemComponent classe to add a function which would do that:
in AbilitySystemComponent .h
UFUNCTION(BlueprintCallable, Category = "Abilities")
TArray<FGameplayAbilitySpec>& GetActivatableGameplayAbilitiesByAllMatchingTags(const FGameplayTagContainer& GameplayTagContainer);
and in AbilitySystemComponent .cpp
TArray<FGameplayAbilitySpec>& UAbilitySystemComponent::GetActivatableGameplayAbilitiesByAllMatchingTags(const FGameplayTagContainer& GameplayTagContainer)
{
TArray<FGameplayAbilitySpec*> AbilitiesSpecs;
GetActivatableGameplayAbilitySpecsByAllMatchingTags(GameplayTagContainer, AbilitiesSpecs);
TArray<FGameplayAbilitySpec>& Abilities;
for (auto GameplayAbilitySpec : AbilitiesSpecs)
{
Abilities.Add(GameplayAbilitySpec)
}
return Abilities
}
There is no error when I compile but I don’t have the function available in blueprint
I don’t know much about C++ so I might do something really stupid, I tried few different things without success so far…