Skip to content

Game Events ​

Game events report notable gameplay occurrences to Crowd Control. Unlike effects, which are purchased by viewers, game events originate in the game and can be used by the game pack to react to player progress or gameplay state.

A complete integration has two parts:

  1. Define each event in the generated menu manifest with Setup Game Event.
  2. Report each occurrence at the relevant gameplay action with Trigger Game Event or Trigger Game Event Json.

Define Events ​

Call Setup Game Event after OnSessionReady (or when IsInitialized is true) and before Print Effects To Json File. The node adds the event to meta.events in the generated menu JSON.

Each CrowdControlGameEventInfo requires:

  • id: Stable, unique event ID used by the game pack and occurrence calls. Use lowercase IDs with no spaces.
  • displayName: Streamer-facing name, such as Player Jumped.
  • arguments: Optional values that the game pack can use to filter or interpret occurrences.

Setup Game Event returns false if the subsystem or event manifest is not initialized, or the event, argument, or literal definition has an empty required ID or display name. Check the return value when building the menu.

Arguments have stable IDs and streamer-facing display names. Use:

Argument typeUseDefinition
NumberAn occurrence includes a number, such as score, zone, or health.Optionally set inclusive minimum/maximum; set integer for whole-number values.
LiteralAn occurrence uses one value from a known set, such as a difficulty or character class.Add each allowed literal with its stable ID and streamer-facing display name.

For example, define player_jump with display name Player Jumped and no arguments. Define boss_defeated with an integer remaining_lives argument when the pack needs that value.

In the Blueprint structs, FCrowdControlGameEventInfo contains id, displayName, and arguments. Each FCrowdControlGameEventArgument contains id, displayName, and type; numeric arguments also use bHasMinimum/minimum, bHasMaximum/maximum, and bInteger. Literal arguments use literals, whose FCrowdControlGameEventLiteral entries each have an id and displayName.

Registration does not require an incoming Crowd Control request. Register definitions during startup or another appropriate setup action. If an event must always appear in the submitted menu, recreate it before generating the menu JSON after any registration rebuild.

Report Occurrences ​

Call Trigger Game Event when the game occurrence has no arguments:

text
Player jumps -> Trigger Game Event
                  Event ID: player_jump

The demo character uses this exact flow: it registers player_jump once the session is ready and reports it when the standard Jump input starts.

Call Trigger Game Event Json when an occurrence has argument values. ArgsJson must be a valid JSON object:

json
{
  "remaining_lives": 2,
  "difficulty": "hard"
}

Argument keys must match the IDs from the event definition. For literal arguments, use a configured literal ID as the value, not its display name. JSON preserves number, boolean, object, and array types; do not quote a number unless the event contract requires a string.

Both trigger nodes return false when the subsystem is not initialized, the event ID is empty, or the loaded CrowdControl.dll predates game-event support. Trigger Game Event Json also returns false if its arguments are not a valid JSON object. A true result means the occurrence passed local validation and was submitted to the native runtime; it is not an acknowledgement that the game pack has processed it.

Ordering and Frequency ​

  • Define an event before generating the menu JSON that will be submitted to Crowd Control.
  • Report an occurrence only after OnSessionReady or when IsInitialized is true.
  • Trigger the event at the actual gameplay transition. Do not report it every Tick.
  • Event occurrences are not effect responses. Do not call EffectSuccess or a failure response unless you are also handling an incoming effect request.

Troubleshooting ​

  • TriggerGameEvent failed because Crowd Control is not initialized: wait for OnSessionReady.
  • TriggerEvent is not supported: update the native CrowdControl.dll in Plugins/UnrealCrowdControl/Binaries/Win64.
  • Invalid JSON arguments: pass an object such as { "key": "value" }; arrays and scalar JSON values are rejected.
  • The pack does not recognize the occurrence: verify that its event ID and argument IDs exactly match the submitted menu manifest.