forked from TheSuperHackers/GeneralsGameCode
-
Notifications
You must be signed in to change notification settings - Fork 2
CommandButtons
andreasw edited this page Jul 23, 2026
·
1 revision
This page documents new CommandButton command types and parameters.
A new context command that orders the selected unit(s) to move to a clicked ground position driving in reverse, instead of turning around first.
Command = REVERSE_MOVE
It works like ATTACK_MOVE/MOVE: the player clicks the button, then clicks a target position on the terrain. The unit drives backwards along the whole path (no three-point turn), forcing reverse movement regardless of the locomotor reverse heuristics.
Example:
CommandButton Command_ReverseMove
Command = REVERSE_MOVE
Options = NEED_TARGET_POS
TextLabel = CONTROLBAR:ReverseMove
ButtonImage = SCReverseMove
CursorName = Move
InvalidCursorName = GenericInvalid
End
Add the button to the unit's CommandSet like any other command button.
Notes:
- Requires a locomotor that can rotate in place / reverse (e.g.
TREADS,HOVER). The reverse speed and behavior are tuned via the Locomotor backwards-movement parameters. - Plays the normal move voice response.
- A manual
REVERSE_MOVEorder forces reversing for the entire path. The GameData flagReverseMoveIgnoreAngleThresholdcontrols whether a manual order reverses regardless of heading.
CommandButton parameters were added to aim a special power at multiple target points in one activation (NumberOfTargets, anchor/target radii, markers, ...). See Multi-Target Special Powers.