Battle Manager
What Is the Battle Manager?
The Battle Manager is the component that runs turn-based combat. It lives on the Game State (one per level). You don’t add it to characters or the battle zone—it’s already on the Game State. From Blueprint you only need to get it and use its functions and events.
Getting the Battle Manager in Blueprint
Use the ACF | Battle category:
Get Battle Manager
World Context Object: pass Self, your Player Controller, or any actor in the level.
Return Value: the Battle Manager component (or empty if not found).
Use this node whenever you need to check battle state, react to events, or call battle functions (e.g. from Widgets, character BPs, level blueprint, or the battle zone).
Battle Lifecycle (Start / End)
Starting a battle
Combat is usually started by a Battle Zone when the player enters. The zone calls Start Combat From Battle Zone on the Battle Manager. You rarely call this yourself unless you start combat from a custom Blueprint (e.g. scripted encounter).
Start Combat From Battle Zone (Authority only)
End Battle (Authority only)
Other useful nodes
Apply Reward (Authority only) — Gives exp, items, and currency from the current encounter to the player.
Display End Battle Widget (Authority only) — b Victory = True for victory screen, False for defeat (uses widgets set in Combat Config).
Show Main Player (Authority only) — Puts the camera and control back on the main player after battle.
Checking Battle State (Pure / Query Nodes)
All of these are Blueprint Pure (no execution pin); use them in branches or to drive UI.
Is In Battle — True if a battle is currently active. Use to show/hide battle UI or disable overworld actions.
Get Active Turn Actor — Pawn that has the turn right now (for UI, camera, highlighting).
Get Next Turn Actor — Pawn that goes next (e.g. for “Next up” in turn order UI).
Get Turn Actor — Pawn at a given turn index (0, 1, 2…) for building a full turn-order list.
Get Active Turn Index — Current position in the turn queue (0-based), or -1 if no turn.
Get Active Battle Zone — The battle zone component of the current encounter (or null).
Get Combat Config — The combat config data asset (for reading phase/turn settings if needed).
Get Current Encounter — The encounter data asset for the current battle.
Get Current Encounter Reward — Reward struct (exp, items, currency) for Apply Reward or UI.
Get Main Player — The actor set as the main player (for possession/restore logic).
Get Current Turn Order Actors — Fills an array with all pawns in turn order (for turn-order UI).
Get Turn Preview — Count = how many turns to show, b Include Active = include current turn; fills an array for “next N turns” UI.
Turn Control
Use these from a place that runs on the server (e.g. Game Mode, Battle Zone, or an event that only runs on authority).
Advance To Next Turn — Moves to the next character’s turn (and runs phase logic). Call when the current turn is “done” (e.g. from a phase Blueprint when the player confirms their action).
Build Initial Turn Order — Builds the turn queue from an array of pawns (usually called internally when combat starts).
Rebuild Turn Order — Rebuilds the queue (e.g. after someone dies); useful if you add/remove combatants in Blueprint.
Add Combatant To Battle — Adds a pawn to the battle and inserts them into the turn order.
Remove Combatant From Battle — Removes a pawn (e.g. when they die or flee).
Clear Turn Order — Empties the turn queue (rare; used for custom flows).
Phase Control (For Custom Phases)
Phases are the steps inside one turn (e.g. “Choose Action” → “Execute” → “End Turn”). The config defines Player Phases and Enemy Phases; the Battle Manager runs the right list depending on whose turn it is.
Start Current Phase — Starts the phase at the current phase index (usually called internally).
Advance To Next Phase — Ends the current phase and starts the next, or advances to the next turn if there are no more phases.
Return To Previous Phase — Goes back one phase (e.g. “back” from target selection to action selection).
Advance To Specific Phase — Jumps to a specific phase (e.g. init or end-of-combat phase).
Get Current Phase — The current phase object (for phase-specific logic).
Get Current Phase Index — Index in the current phase list (0, 1, 2…).
Most Blueprint users will bind to events (see below) rather than call these directly, unless they’re authoring custom phases.
Events — What to Bind in Blueprint
Bind these on the Battle Manager (e.g. from your HUD, battle UI, or level blueprint) to drive UI and logic.
Event | When it fires | Typical use in Blueprint |
|---|---|---|
On Battle Started | Combat has started (also on clients when replicated). | Show battle HUD, disable overworld input, play battle start SFX. |
On Battle Ended | Battle is over. b Player Victory = win/loss. | Show victory/defeat screen, play music, call Finalize Battle End when ready. |
On Phase Changed | Phase index changed. New Phase Index = new index. | Update “phase” UI (e.g. “Select Action” vs “Select Target”). |
On Turn Order Ready | Turn order was just built. Battle Manager = this component. | Build or refresh turn order UI (portraits, names). |
On Active Turn Changed | Whose turn it is changed. Battle Manager, Active Actor = current turn pawn. | Update “current turn” highlight, camera, or text (“Player 1’s turn”). |
On Rebuild Turns Order | Turn order was rebuilt mid-battle. | Refresh turn order UI after someone dies or is added. |
On Turn Ability Started / On Turn Ability Ended | A turn ability started/ended. ability = the ability. | Show “executing ability” UI or disable input during execution. |
On Turn Begin | A pawn’s turn just started. Beginning Pawn = that pawn. | Focus camera, enable input for that pawn, show “Your turn” for player. |
On Turn End | A pawn’s turn just ended. Ending Pawn = that pawn. | Clear “your turn” state, maybe trigger AI for next turn. |
How to bind: Get the Battle Manager (e.g. with Get Battle Manager from the Game State or a world context), then use Bind Event to On Battle Started (and similar) or Add Dynamic to the delegate you need.
Configuration (Combat Config)
The Battle Manager’s behavior comes from a Combat Config data asset (set on the Game State’s Battle Manager in the editor). It defines:
Turn order strategy (who goes when).
Player Phases and Enemy Phases (the steps per turn).
Init Combat Phase (e.g. intro or “choose action”).
End Combat Phase (e.g. rewards screen).
Victory and Defeat widget classes.
Turn-ability moveset and other combat options.
As a Blueprint user you mostly use this via the Battle Manager’s nodes; you only edit the asset if you’re tuning combat flow or adding phases.
Quick Blueprint Workflow Examples
Turn order UI
Get Battle Manager → Get Current Turn Order Actors (or Get Turn Preview) → use the array to build portrait/list.
Bind On Turn Order Ready and On Rebuild Turns Order to refresh the list.
Bind On Active Turn Changed to highlight the current turn actor.
“Whose turn?” display
Get Battle Manager → Get Active Turn Actor (and optionally Get Next Turn Actor).
Compare with your party/player pawns to show “Your turn” or “Enemy turn.”
Optionally bind On Turn Begin / On Active Turn Changed to update when the turn changes.