[GAS] WaitGameplayEvent in ActivateAbility

Im trying to play montage and wait event tag “Ability.Skill.Casting.Self.MakeWay” in ActivateAbility.

this is what I did,
AbilitySystemComponent->PlayMontage(GameplayAbility, ActivationInfo, SkillMontage, 1.0, none, 0.0);|
AbilitySystemComponent->WaitGameplayEvent(GameplayAbility, Ability.Skill.Casting.Self.MakeWay, nullptr, true, true);|

But WaitGameplayEvent is not an member of AbilitySystemComponent.
I couldn’t figure out how to WaitGameplayEvent.

You shouldn’t use PlayMontage direct, you should use the Ability Tasks.

Check PlayMontageAndWait task and WaitGameplayEventTask in the Abilities/Tasks folder of the GAS plugin.

UAbilityTask_WaitGameplayEvent
UAbilityTask_PlayMontageAndWait

I highly suggest you use these in Blueprint, as i can see your C++ is very new. Dont run before you can walk.

2 Likes

Thanks a lot.
Actually, I am trying to convert BP to C++.
I am going throug some tough times, cause C++ is more and more complicated.

1 Like