FGameplayCueDispatcher
Process-wide, data-driven cue dispatch. HandleCue routes a fired cue to the most specific installed handler whose tag is an ancestor-or-equal of the cue tag (so a handler on "GameplayCue" catches everything under it, while a handler on "GameplayCue.Death" overrides it for that subtree), then to the observer. A cue with no matching handler is a silent no-op — the authored data survives even when nothing is wired to play it.
- Module
- Game
- Header
#include "Gameplay/GameplayCue.h"- Namespace
Mowo
Type aliases
| Alias | Description |
|---|---|
using Handler = std::function<void(const FGameplayCue&)> |
Public functions
| Returns | Name | Description |
|---|---|---|
void | SetHandler | Install a handler for a cue-tag subtree. |
bool | HasHandler | |
void | ClearHandler | |
void | SetObserver | Sees every fired cue regardless of tag — runs after the subtree handler. |
void | ClearObserver | |
void | ClearAll | |
bool | HandleCue | Route a cue to its best-matching subtree handler and the observer. |
bool | HandleCue | |
uint32_t | CueWireId | A cue that crosses the wire travels as a 32-bit id, never as an FName index (those are per-process) and never as a string (the RPC codec takes fixed-width parameters only). |
void | RegisterCueTag | |
FGameplayTag | ResolveCueWireId |
Function details
SetHandler
static void SetHandler(FGameplayTag tagPrefix, Handler handler)Install a handler for a cue-tag subtree. Re-registering the same tag replaces it. An empty handler removes the registration.
HasHandler
static bool HasHandler(FGameplayTag tagPrefix)ClearHandler
static void ClearHandler(FGameplayTag tagPrefix)SetObserver
static void SetObserver(Handler observer)Sees every fired cue regardless of tag — runs after the subtree handler.
ClearObserver
static void ClearObserver()ClearAll
static void ClearAll()HandleCue
static bool HandleCue(const FGameplayCue& cue)Route a cue to its best-matching subtree handler and the observer. Returns true when a handler ran.
HandleCue
static bool HandleCue(FGameplayTag tag, EGameplayCueEvent event, const FGameplayCueParams& params)CueWireId
static uint32_t CueWireId(FGameplayTag tag)A cue that crosses the wire travels as a 32-bit id, never as an FName index (those are per-process) and never as a string (the RPC codec takes fixed-width parameters only). The id is FNV-1a32 of the tag PATH — the same construction as MAbilitySystemComponent::AbilityWireId, so the two read alike in a packet dump. Resolving an id back to a tag needs the receiver to have SEEN the tag. Unlike an ability id — which the receiver can look up in the replicated granted set — a cue has no such list, so the registry is populated from everything that names a cue tag locally: installing a handler for a subtree, and firing a cue. A game with authored cue tags nothing has touched yet registers them explicitly.
RegisterCueTag
static void RegisterCueTag(FGameplayTag tag)ResolveCueWireId
static FGameplayTag ResolveCueWireId(uint32_t wireId)