Not logged in - Login
< back

Gameplay Cues

AGameplayCueNotify_Actor vs UGameplayCueNotify_Static

AGameplayCueNotify_Actor is an actor instance that gets spawned in the level. It has state and can tick.
UGameplayCueNotify_Static is not an actor and is not instanced. UGameplayCueNotify_Static is good from quick things like Hit Impacts that don't need state.

AGameplayCueNotify_Actor Lifecycle

For Duration Gameplay Effects

When the Gameplay Effect is added, the attached Gameplay Cue fires WhileActive and OnActive events. When the Gamplay Effect is removed, the Gameplay Cue fires the OnRemove event.

Either bAutoDestroyOnRemove needs to be set to true or End (Recycle) Gameplay Cue needs to be manually called. Keep in mind that Gameplay Cues are not destroyed and recreated, so you will have to deal with re-initialization as the values from the previous Gameplay Cue will still be there when this Gameplay Cue is used a second time. AutoDestroyDelay can be used to delay the recycle X number of seconds when bAutoDestroyOnRemove is set to true.

Gameplay Cue Instancing

Gameplay Cues are automatically instanced by Class and Target. They are optional instance by Instigator and Source using bUniqueInstancePerInstigator and bUniqueInstancePerSourceObject. Here is the instancing formula in the Gameplay Cue Manager:

FGCNotifyActorKey NotifyKey(TargetActor,  
CueClass,                      
CDO->bUniqueInstancePerInstigator ? Parameters.GetInstigator() : nullptr, CDO->bUniqueInstancePerSourceObject ? Parameters.GetSourceObject() : nullptr);