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

Create Gameplay Effects

Step 1

To add a new effect, simply create a child class of U_GameplayEffect_Duration or U_GameplayEffect_Ticking.

The difference is that U_GameplayEffect_Ticking contains an additional tick function that can be used for example for damage over time.

Open it and change the name, duration, maxStacks etc. in the class defaults.

Step 2

OnGameplayEffectStart, OnGameplayEffectEnd, and OnTick (in the case of U_GameplayEffect_Ticking) can be overridden. 

If the effect is stackable, the IncrementStack function must be overridden, as in the example. It would be possible for each stack to add its own modifier, but I recommend to overwrite the modifier with a new value to reduce CPU load when calculating. Example for MaxHealth:

Step 3

To test the effect, it must be added to an actor using “Apply GameplayEffect”. BP_GameplayEffectTester shows how to apply an effect.

How can we help?