# GetCommand

Objects
Commands
5.1 OC
any
int element Data to be returned. Unspecified or 0: Name, 1: Target, 2: TargetX, 3: TargetY, 4: Target2, 5: Data
int command_num Number of the command. 0 is the currently active command, other values are the following (super-level) commands.
Returns information on a current command of an object. If the object does not have any commands set, `nil` is returned for all queries.
func Timer() { if(GetCommand() == "Enter" && GetCommand(1) == FindBase(GetOwner())) Enter(FindBase(GetOwner())); }
If the object has been commanded to enter the home base, this script will warp the object there directly.
SetCommand
AddCommand
AppendCommand
PeterW
2001-11