A Gameplay Cue Actor, derived from BP_GameplayCueActor, is an actor that the gameplay cue system uses to handle spawning & destroying visual effects as well as any relevant code related to the visual effect. All Gameplay Cue actors derive from the base Gameplay Cue Actor class and can override functions in order to create unique functionality.
Gameplay Cue actors can be used with abilities that need to spawn actors to create visual effects associated with the ability.
Spawning Gameplay Cues
Gameplay Cue Actors have something called an “Instancing Policy”. Which is the policy that tells the Ability System Component what to do with a gameplay cue once spawned. In the details panel of a gameplay cue you will find an enum with two different settings: “Instance Per Execution” and “Instance Per Actor”. Instance per execution will essentially spawn a new actor each execution. Instance per actor will spawn once & use the same actor. This actor will be owned by the owning actor of the Ability System Component.
To Spawn a gameplay cue & add it to the gameplay cue component you can also call the function: “Add Gameplay Cue Actor By Class”.
To Spawn a gameplay visual effect at run time you can call: “Execute Gameplay Cue Actor” from the gameplay cue component or “Execute Gameplay Cue By Tag”. Depending on what you need to do with the gameplay cue.
NOTE: In order for “Execute Gameplay Cue By Tag” to work, an instance of the gameplay cue must be held by the ability system component.
There are a few input parameters that can be passed through to change the gameplay cue effect. This is known as “Gameplay Cue Data”. Which is various different data about the gameplay cue. This can be used if you need to send specific kinds of data about the gameplay cue.
Basic Usage
The flow of logic execution for a Gameplay Cue Actor is like this:
OnExecute - Executes logic associated with the gameplay cue. It is up to the developer to destroy the gameplay cue manually once the gameplay cue actor has finished what it needs to do.
This is the function that users need to override to create custom functionality for a gameplay cue
OnRemove - Removes the gameplay cue, this function could possibly be used to destroy the gameplay cue. Destroy Actor needs to be called by the developer manually.
Tags
Gameplay Tags can be associated with a gameplay cue actor by opening the gameplay cue actor and selecting the details panel and searching for “Gameplay Cue Tag”. The gameplay cue tag can be used to execute a gameplay by tag (if the gameplay cue is added to an actors ability system component).