Gameplay Effects Container

The documentation of Generic Game Framework.

Cover.GGA
A

Author

Author

Created: Apr 14, 2025Updated: Apr 14, 2026

Table of contents

Gameplay Effect Container

Original implementation

GGA also implements the GameplayEffectContainer described in this section .

gga guide 33

Containers in GGA

The difference is that you can use containers anywhere in the game, not just within ability.

You can access the relevant API through GGA_ GameplayEffectContainerFunctionLibrary.

gga guide 34

At the same time, in the Targeting section, I abandoned the "TargetType" method mentioned in the original implementation and instead adopted the "Gameplay Targeting System" provided by UE5.2.

How to use

You can forget about the two paragraphs above and read just this part. In brief:

GameplayEffectContainer: is a simple structure that defines a TargetingPreset and multiple GameplayEffects, which you can think of as “a bunch of game effect definitions”.

GameplayEffectContainerSpec: is an instance of GameplayEffectContainer, which contains a TargetData field (the result of the target obtained from the TargetingPreset), and TargetGameplayEffectSpecs field (instances of GameplayEffects defined in the Container).

When you apply a GameplayEffectContainerSpec, you are batch applying multiple GameplayEffectSpecs to all Actors within the TargetData(Targets were fetched by Gameplay Targeting System).

The simplest way to use the process is as follows:

gga guide 35
In most cases, it is recommended to use this method to apply multiple game effects to multiple targets at the same time, which is more efficient.
请先尝试制作简单的陷阱Actor,给进入的玩家用Container的方式施加GE。 Container底层还会用到GameplayTargetingSystem,用来获取目标的,把它也得先搞明白。然后再尝试下面的制作近战流程。