I’m trying to cast a gameplay effect on a character with a gameplay effect spec to use the tag requirements and manage the modifiers that will be used. But I’m confused because my test character has all the requirement tags, but the effect doesn’t apply and i’m going crazy trying to figure out where i’m failing.
void UGASGameplayAbility::ApplyEffectToSelf()
{
for (const auto& _Effect : AbilityEffects)
{
GetCurrentAbilitySpec()->SetByCallerTagMagnitudes.Add(_Effect.Key, AbilityActiveTime);
auto _SpecHandle = MakeOutgoingGameplayEffectSpec(GetCurrentAbilitySpecHandle(), GetCurrentActorInfo(), GetCurrentActivationInfo(), _Effect.Value.Get());
if (_SpecHandle.IsValid())
{
ApplyAbilityTagsToGameplayEffectSpec(*_SpecHandle.Data.Get(), GetCurrentAbilitySpec());
ApplyGameplayEffectSpecToOwner(GetCurrentAbilitySpecHandle(), GetCurrentActorInfo(), GetCurrentActivationInfo(), _SpecHandle);
}
}
}
I tried other ways to apply what I want, but I was unsuccessful. The tags are being applied correctly to Gameplay Spec, I checked using GetActorTags() and GetSpecTags(), but the effect is not applied. When removing requirement tags from modifiers in the Gameplay Effect, the effect is applied normally.
The same happens when changing the application and tags from Source to Target.
I’m taking ideas on how I can better visualize what might be happening or examples of how to apply the effect with requirements. :S