Gameplay Tags: State and event routing (Blueprint) โ
What/Why: Use tags as a shared language for state, queries, gating, and lightweight events.
Prereqs
- Gameplay Tags plugin enabled; define your tag list in Project Settings
Steps
- Scheme
- Use namespaces:
State.*,Ability.*,UI.*,Cooldown.*,Interact.*
- Adding/removing
- On Pawn/Subsystem, add/remove tags via
Add Loose Gameplay TagandRemove - For scoped tags, add on enter; remove on exit (timers or events)
- Queries
Has Tag,Has Any,Has Allfor gating input/abilities- Switch on Tag for simple state machines
- Events
- Treat add/remove as one-frame events (set then clear) to broadcast
- Use with MVVM to toggle UI visibility
Data
- Store tag lists in DataAssets for loadouts, UI states, interactions
Networking
- Replicate tag containers for Pawns; avoid spamming add/remove
Performance
- Prefer
Has Tagchecks over booleans spread across Blueprints
Testing
- Add/remove sequences update UI and block abilities as expected
Suggested prompts โ
- โDesign a tag scheme for my game and show where each tag is set/cleared.โ
- โConvert boolean flags to tags and update checks in Blueprints.โ
- โShow how to use tag adds/removes as one-frame events.โ
Prompts for this example
- โWrite nodes to toggle
UI.HUD.Visiblewith a tag and bind the result to widget visibility.โ - โProvide a Switch-on-GameplayTag flow for a simple
Statemachine.โ