Unit Control
80 scripting commands. Also as Markdown for agents.
- allowGetInSet if the units given in the list are allowed to enter vehicles.
- assignAsCargoAssign a unit as cargo of a vehicle. Used together with orderGetIn to order a unit to get in as cargo into a specific vehicle.
- assignAsCargoIndexAssigns the character to a specific cargo / passenger index of the given vehicle.
- assignAsCommanderAssign a unit as commander of a vehicle. Used together with orderGetIn to order subordinate units to get in as commander of a specific vehicle.
- assignAsDriverAssign a unit as driver of a vehicle. Used together with orderGetIn to order subordinate units to get in as driver of a specific vehicle.
- assignAsGunnerAssign a unit as gunner of a vehicle. Used together with orderGetIn to order subordinate units to get in as gunner of a specific vehicle.
- assignedCargoReturns the list of soldiers assigned to the given vehicle as a cargo.
- assignedCommanderReturns the soldier assigned to the given vehicle as a commander.
- assignedDriverReturns the soldier assigned to the given vehicle as a driver.
- assignedGunnerReturns the soldier assigned to the given vehicle as a gunner.
- attackEnabledReturn whether a group's leader can issue attack commands to soldiers under his command.
- commandFireOrder the given unit to fire on the given target (via the radio). If the target is objNull, the unit is ordered to fire on its current target (set…
- commandFollowOrder the given unit(s) to follow another from his own group (via radio). It can also be used to resume unit formation after e.g doStop.
- commandFSMOrders a unit to process command defined by FSM file (via the radio).
- commandGetOutOrders one or multiple units to get out from the vehicle (via the radio). Same as doGetOut with latter being silent.
- commandSuppressiveFireOrders the given unit or a group of units to suppress the given position or target (with radio messages, see doSuppressiveFire if you do not want…
- commandWatchOrders the unit(s) to watch the given position or target (via the radio). Use objNull as the target to order a unit to stop watching a…
- currentCommandReturn the current command type (empty string when no command) for the commander of given vehicle (or for a given soldier).
- doFireOrder the given unit(s) to fire on the given target (without radio messages).
- doFollowOrder the given unit(s) to follow another from his own group as his formation leader (without radio messages).
- doFSMOrders a unit to process command defined by FSM file (silently).
- doGetOutOrders one or multiple units to get out from the vehicle (silently). Same as commandGetOut with latter being shown via radio chat.
- doMoveOrder the given unit(s) to move to the given position (without radio messages). Upon reaching its destination, if it is the group leader it will…
- doStopOrder the given unit(s) to stop (without radio messages). The units stopped in this way will leave the groups formation.
- doSuppressiveFireOrders the given unit or a group of units to suppress the given position or target (without radio messages, see commandSuppressiveFire is you need…
- doTargetOrder the given unit(s) to target the given target (without radio messages). Targeting can be stopped by
- doWatchOrder the given unit(s) to watch the given position or target (without radio messages). Use objNull as the target to order a unit to stop watching a…
- effectiveCommanderReturns the effective commander of the vehicle. Effective commander is the player whom driver AI will listen to.
- emptyPositionsReturns the number of given empty positions in the vehicle.
- enableAttackSet if leader can issue attack commands to the soldiers in his group.
- expectedDestinationReturn expected destination of unit as an array.
- fireForces a unit to fire the given weapon.
- fireAtTargetRemotely forces a unit to fire the given weapon. See also BIS_fnc_fire.
- forceFollowRoadForces the vehicle to stay on road.
- forceWeaponFireThe unit will be forced to fire weapon from the given muzzle. The weapon will not fire if firemode passed as parameter is not supported by the given…
- forgetTargetResets the info a group has about a target, forcing knowsAbout value to 0.
- formationLeaderReturn leader of the formation.
- formLeaderReturns the formation leader of a given unit. This is often the same as the group leader, but not always, for example in cases when a unit is ordered…
- getCruiseControlReturns cruise control settings set with setCruiseControl command.
- getLeaningReturns the leaning factor of the given unit.
- glanceAtControl what the unit(s) is/are glancing at (target or Position). If target is used, it will get revealed fully.
- inChecks whether value is in array, unit is in vehicle, position is inside location or ANSI string is part of other ANSI string. If Unicode support is…
- landForces a helicopter landing. If there is a helipad nearby, the helicopter will attempt to land on it. VTOL he other hand will just land somewhere. To…
- landAtOrder an AI airplane to land at a given airport. ID is the number to identify which map airport you want the airplane to land at. See Arma: Airport…
- landResultReturn the result of helicopter landing position searching (performed after the land command).
- leaveVehicleCeases the using of the vehicle by a group and unassigns vehicle from the group. If the argument is a single unit, the vehicle will be unassigned…
- limitSpeedLimit the speed of an AI-driven vehicle or AI person to given value. It has continuous effect and AI will not break through the speed limitation…
- lookAtControl what the unit(s) is/are looking at (target or Position). If target is used, it will get revealed fully.
- moveLet group move to given position. Active waypoints will be ignored when command is used.
- moveInAnyMoves unit to the first available seat in the specified vehicle.
- moveInCargoMoves a unit into a vehicle cargo position (immediately and without animation).
- moveInCommanderMove soldier into vehicle commander position (Immediate, no animation).
- moveInDriverMoves soldier into vehicle driver position (immediate, no animation).
- moveInGunnerMove the unit into vehicle gunner position (immediate, no animation).
- moveOutMoves the soldier out of the vehicle.
- moveToLow level command to person to move to given position. It is good to check first if AI pilot unit state is COMPLETED moveToCompleted first as this…
- moveToCompletedCheck if latest low level moveTo command is finished. Returns true if given AI pilot unit state == COMPLETED
- moveToFailedCheck if latest low level moveTo command failed.
- orderGetInForce all units in the array to get in or out of their assigned vehicles. Units must be assigned to a vehicle before this command will do anything.
- playActionWhen used on a person, a smooth transition to the given action will be initiated.
- poseReturns the pose of the given unit.
- sendSimpleCommandSends a simple command to the vehicle's driver / gunner (air vehicles ignore it). See also vehicleMoveInfo.
- setCruiseControlLimits or sets local player-controlled vehicle's speed through cruise control.
- setDestinationSet the destination for path planning of the pilot.
- setEffectiveCommanderSets effectiveCommander of the given vehicle. Effective commander is the person who commands the vehicle, i.e. gives commands to the driver.
- setFormationTaskSet the current task of the formation member.
- setUnitPosSet unit position rules. This command will not change the stance of the human player, even though it will change the output of unitPos command. To…
- setUnitPosWeakSet unit position rules. This command is the lowest level of priority for setting unit position and to be used in scripted FSM's. Priorities are: 1.…
- setUnloadInCombatSets whether or not cargo or turret units *should* get out of vehicle when in combat. If true, vehicle will stop and units will dismount. Vehicle…
- stanceReturns the stance of the given unit.
- stopStop an AI unit from turning or moving, preventing it to follow a watched object or engage an enemy properly - although if properly aligned, the unit…
- stoppedCheck if unit is stopped by stop command.
- suppressForForce suppressive fire from the unit.
- swimInDepthSets the target depth level for swimming soldier. Depth should be a negative number.
- switchActionWhen used on a person, the given action is started immediately (there is no transition). Use switchmove "" to switch back to the default movement if…
- unassignVehicleUnassigns individual unit from a vehicle, usually previously assigned with *assignAsXXX* command, i.e removes assignedVehicleRole of the unit.
- unitPosReturn the unit position rules.
- unitReadyCheck if the unit is ready. Unit is busy when it is given some command like move, until the command is finished.
- vehicleMoveInfoReturns current vehicle move/turn info (a getter for sendSimpleCommand) in format [moveInfo, turnInfo]. Possible values:
- weaponDirectionReturns the direction that the vehicle weapon is aiming in. For addons the weapon name must be an entry in CfgWeapons.