Gameplay Cue Data Asset {{ currentPage ? currentPage.title : "" }}

A Gameplay Cue Data Asset, derived from BP_GameplayCue, is a Data Asset that can be used by the gameplay cue system to spawn simple visual effects that do not need a gameplay cue actor. Typically, these are used for simple use cases such as spawning sparks, blood particles, or hit sounds. The Gameplay Cue Data Asset requires the Gameplay Cue Component to do things like spawn particle at location or play sound at location.

The purpose of a gameplay cue data asset is for spawning particle systems and play sound effects associated with a gameplay cue without the need to spawn a new gameplay cue actor. This can reduce actor spawns for simple gameplay cues.

Playing Gameplay Cue Data Asset

In order to play a gameplay cue static, the actor will need its own Ability System Component, or access to an Ability System Component owned by another Actor.

With a reference to an ability system component from an actor, you can call either “Play Gameplay Cue” or “Play Gameplay Cues”. One will play a single Gameplay Cue and the other one will take an array of gameplay cues & play them all.

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:

  1. OnExecute - Executes logic associated with the gameplay cue. Gameplay Cue data assets do not spawn or create new instances at runtime. So the developer does not need to worry about manually destroying a gameplay cue data asset once the gameplay cue has finished what it needs to do.

    1. This is the function that users need to override to create custom functionality for a gameplay cue

NOTE: When writing functionality in the gameplay cue data asset I recommend that you do not modify the data asset variables at runtime. The only variables you should modify at runtime in a gameplay cue data asset are local variables.

Tags

Gameplay Tags can be associated with a gameplay cue data asset by opening the gameplay data asset and selecting the details panel and searching for “Gameplay Cue Tag”. The gameplay cue tag can be used if needed

Impact Effect Gameplay Cue Data Asset

An Impact Effect Gameplay Cue Data Asset, derived from BP_ImpactEffect, is a gameplay cue data asset included and setup by default to be used for simple use cases such as spawning sparks, blood particles, mixing particle emitters together, or hit sounds.

There are two types of impact effect data assets that you can use depending on what sort of gameplay cue you are trying to create. BP_Cascade_ImpactEffect and BP_Niagara_ImpactEffect. This is to add support for both Cascade and Niagara to the default included impact effects system.

Impact Effects have some default properties that can be used to change the effect in a few different ways. Here I will list some of these properties and what their purpose is:

  • Impact Emitters - This is where you can add the visual effect emitter particles. This is a map variable, the key is the surface type and the value is a structure which allows you to set an array of impact emitters as well as adjust the rotation & scale of the effect.

  • Mixed Reaction Emitter - This is a visual effect that you can mix with the primary visual effect. For example if you want to spawn blood & sparks at the same time when hitting an enemy.

  • Impact Effect Index Type - this will allow you to choose between a custom index or random index. Which will change which effect is taken from the visual effects array.

  • Emitter Index - the visual effect index that is chosen when “Custom Index” is selected.

  • Spawn Mixed Emitters - If true, the mixed emitter will be spawned with the main visual effect emitter.

  • Impact Sound - this will allow you to add a different impact sound depending on the surface type

  • Camera Shake Class - This will allow you to add a camera shake to this impact effect

  • Camera Shake index - this will allow you to specify a custom index to use when playing a camera shake from the array of camera shakes.

  • Camera Shake Scale - this will be the scale of the camera shake used when playing the camera shake for the impact effect

  • Gameplay Cue Tag - Gameplay tag associated with the gameplay cue

{{{ content }}}