1. Home
  2. Docs
  3. Damage, Resource and Stat System
  4. Starter Guides
  5. Create Gameplay Effect

Create Gameplay Effect

Step 1

To add a new effect, simply create a child class of GE_Duration or Ge_Ticking.
I also created some subclasses for common cases.

  • GE_Duration_DamageProcessing can be used for shield effects / absorbs / damage reduction
  • GE_Duration_ApplyModifier can be used for increasing/decreasing stats
  • GE_Ticking_DamageOverTime can be used for damage effects
  • GE_OneTimeEffect is a base class for one time effects, they will only execute the start function

You can edit the effect parameter (duration, max stacks, etc.) in the class defaults.

Step 2 - Custom functions

You can override the functions “OnGameplayEffectStart”, “OnGameplayEffectEnd” and “OnTick” (only in GE_Ticking).

(some classes may have more functions that can be used, e.g. the damage processing class has a function called “process damage”)

The following images are examples to add a modifier and remove it on end.

Make sure you override the stacking function to update the modifier when the effect is stackable. (Multiply the modifier value with the stacks and call “Add Modifier” again, but check the “Override Existing Modifier” box)

Step 3

To test a effect it must be added to an actor using the function “Apply Gameplay Effect”
(target need a gameplay component and make sure the target has all requirements to handle the effect, e.g. you cant handle damage when no damage component exists)

Instigator and causer are not necessary if you only for example add a modifier. 
But they can used to determine how strong a effect should be etc.

How can we help?