Skip to content

Sein AI Controller

Class · ASeinAIController : AAIController

#include "Player/SeinAIController.h"

can be subclassed in Blueprint

A computer player’s brain. The Game Mode spawns one (its AI Controller Class) for each AI slot, and for a dropped human’s slot when the drop policy hands it to AI. Author the reasoning in Blueprint, a Behavior Tree, a StateTree or C++: it reads the simulation and issues orders with Emit Command, the way a player’s controller does.

Only the host runs AI, so the reasoning need not be deterministic; only the commands it emits cross the lockstep boundary. Like a human player, the AI gets a Player State from the Game Mode’s Player State Class.

Play a slot: registers with the simulation and labels the Player State.

void SetSeinPlayerID(FSeinPlayerID InPlayerID);

The match slot this AI controller plays. Invalid until Set Sein Player ID is called or the Game Mode assigns a slot.

FSeinPlayerID GetSeinPlayerID() const;

Issue a command for this AI’s player. Valid only from On Sim Tick.

void EmitCommand(const FSeinCommand& Command);

Overridable in Blueprint, with a native default

Runs every simulation tick on the host, before that tick’s commands process, so commands emitted here apply this tick.

void OnSimTick(const FSeinAITickContext& Context);