Command Definition and Dispatch
This page focuses on configurable types and public entry points rather than the complete gameplay flow. Start with Command System to understand the path from player or AI intent to the execution layer. To integrate an AI Pawn, see Integrate a Minimal Commandable Unit.
UGAIS_CommandSystemComponent is a UPawnComponent, so its configuration and runtime state belong to a Pawn. Do not treat the payloads or queue APIs below as a general-purpose command framework for arbitrary Actors or Controllers.
UGAIS_CommandSystemComponent
The component owns the authoritative command entry point and replicated observable state. It does not retain a complete execution history or expose the internal state of execution backends. Project UI should use Current, Queue, Last, and the events to present command feedback.
FGAIS_CommandData
This is the runtime payload that describes what a single request issues. Input, UI, scripts, network requests, and Tactical Assignment can construct it; CommandSystem then normalizes and validates it against the Definition's target contract.
Helpers such as MakeTargetless, MakeActorTarget, and MakeLocationTarget reduce manual payload errors, but their output must still match the Definition's TargetType.
UGAIS_SimpleCommandDefinition
Simple is the most common command asset base class: one saved default configuration describes one stable command. It suits Move, Interact, Heal, ordinary Attack, and similar capabilities that do not need several independent variants behind one entry point.
UGAIS_MultiVariantCommandDefinition and Variants
MultiVariant groups several stable choices under one command class. A variant's position in the Variants array is its runtime identity for FGAIS_CommandData.Index and command references; DebugName is only for editor and debug display.
UGAIS_CommandExecutionDefinition
An execution definition is an inline, stateless adapter configuration. It receives a Context with the precise execution identity: StartExecution establishes an asynchronous route or reports synchronously, while CancelExecution releases external state still owned by that execution. Temporary tasks, subscriptions, and callbacks for one command belong to the backend runtime, not the Definition asset.
Request, queue, and cancellation entry points
These Blueprint entry points all have authoritative-server semantics. The client that owns a Pawn should call the corresponding Server... RPC; non-owning clients need a project network entry point to forward the request.
Cancellation policy and request results
Whether the queue continues after cancellation depends on the terminal result and the command's success criteria. Do not assume that Canceled always means either “continue” or “stop.”