Actions – ArmA: Armed Assault

From Bohemia Interactive Community
Jump to navigation Jump to search
m (crash info added)
m (Some wiki formatting)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Introduction =
{{TOC|side|0.9}}
 
Actions are events that are usually executed in-game by the player by using the action menu, or by using the action sub-menu of the command menu when executing them upon AI in the the player's group. Actions can also be performed by and upon arbitrary units using the [[action]] script command. Executing an action in this way will generally create only the basic effect of that seen when starting actions using the action menu, so it may be necessary to script additional effects to achieve the same effect as the game's default action menu, and to maintain immersion. For example, scripted use of the [[#DEACTIVATE|"deactivate"]] action will not check the distance between the satchel and the collecting unit, allowing it to be used to pick up a satchel that is many kilometers away. Many actions can be executed by a different unit than the target unit, although in most cases it makes more sense to use the same unit. The unit executing the action will generally bend down as if to pick something up (the action animation), with the action effects taking place when the animation completes. It is possible to use a [[Game_Logic|game logic]] unit to execute actions without any animation or delay.
Actions are events that are usually executed in-game by the player by using the action menu, or by using the action sub-menu of the command menu when executing them upon AI in the the player's group. Actions can also be performed by and upon arbitrary units using the [[action]] script command. Executing an action in this way will generally create only the basic effect of that seen when starting actions using the action menu, so it may be necessary to script additional effects to achieve the same effect as the game's default action menu, and to maintain immersion. For example, scripted use of the [[#DEACTIVATE|"deactivate"]] action will not check the distance between the satchel and the collecting unit, allowing it to be used to pick up a satchel that is many kilometers away. Many actions can be executed by a different unit than the target unit, although in most cases it makes more sense to use the same unit. The unit executing the action will generally bend down as if to pick something up (the action animation), with the action effects taking place when the animation completes. It is possible to use a [[Game_Logic|game logic]] unit to execute actions without any animation or delay.


Line 9: Line 8:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|''unit'':                       ||[[Object#Unit|Object]]. Can be any occupied [[Object#Vehicle|vehicle]] or [[Object#Person|person]] that is not in a vehicle.
|''unit'':
| [[Object#Unit|Object]]. Can be any occupied [[Object#Vehicle|vehicle]] or [[Object#Person|person]] that is not in a vehicle.
|-valign=top
|-valign=top
|''"actionType"'':               ||[[String]]. Not case sensitive.
|''"actionType"'':
| [[String]]. Not case sensitive.
|-valign=top
|-valign=top
|''parameter(s)'':               ||Various [[Data_Types|data types]], dependant on the action used. The number of required parameters depends on the action type.
|''parameter(s)'':
| Various [[Data_Types|data types]], dependant on the action used. The number of required parameters depends on the action type.
|}
|}


Line 23: Line 25:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Toggles auto-hovering on and off. Note that while the auto-hover status can be toggled on an AI crewed or even an empty vehicle, it will only affect a vehicle controlled by a human pilot.
|'''Description''':
| Toggles auto-hovering on and off. Note that while the auto-hover status can be toggled on an AI crewed or even an empty vehicle, it will only affect a vehicle controlled by a human pilot.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["autoHover", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["autoHover", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is any vehicle that is capable of hovering.  
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is any vehicle that is capable of hovering.
|-valign=top
|-valign=top
|'''Example''':             ||chopperOne action ["autoHover", chopperOne]
| '''Example''':
| <sqf>chopperOne action ["autoHover", chopperOne]</sqf>
|}
|}


Line 36: Line 42:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Cancels an action in progress. The target unit will complete it's current animation, although the action itself will not be performed.
|'''Description''':
| Cancels an action in progress. The target unit will complete it is current animation, although the action itself will not be performed.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["cancelAction", ''targetUnit'']'''
|'''Syntax''':
| ''unit'' action ["cancelAction", ''targetUnit'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetUnit'' is any unit that is in the process of performing an action.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetUnit'' is any unit that is in the process of performing an action.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["CANCELACTION", soldierOne]
| '''Example''':
| <sqf>soldierOne action ["CANCELACTION", soldierOne]</sqf>
|}
|}


Line 49: Line 59:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Cancels autopilot landing for an aircraft, including AI controlled aircraft.
|'''Description''':
| Cancels autopilot landing for an aircraft, including AI controlled aircraft.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["cancelLand", ''targetVehicle'']'''
|'''Syntax''':
| ''unit'' action ["cancelLand", ''targetVehicle'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is any vehicle that is currently performing an autopilot landing.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is any vehicle that is currently performing an autopilot landing.
|-valign=top
|-valign=top
|'''Example''':             ||planeOne action ["cancelLand", planeOne]
| '''Example''':
| <sqf>planeOne action ["cancelLand", planeOne]</sqf>
|}
|}


Line 62: Line 76:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Cancels taking of a flag. The unit will complete the taking/action animation, but the flag will remain attached to it's current object. This action needs to be executed while the flag is being taken (which happens after the unit completes the taking/action animation) to prevent a unit taking the flag. For example, if a person is taking a flag from a flagpole, then the cancelTakeFlag action should be executed while the flag is descending the flagpole.
|'''Description''':
| Cancels taking of a flag. The unit will complete the taking/action animation, but the flag will remain attached to it is current object. This action needs to be executed while the flag is being taken (which happens after the unit completes the taking/action animation) to prevent a unit taking the flag. For example, if a person is taking a flag from a flagpole, then the cancelTakeFlag action should be executed while the flag is descending the flagpole.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["cancelTakeFlag", ''targetFlag'']
|'''Syntax''':
| ''unit'' action ["cancelTakeFlag", ''targetFlag'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit that is currently taking a flag (no action animation is performed) and ''targetFlag''' is a flag object.
|
| Where ''unit'' is any unit that is currently taking a flag (no action animation is performed) and ''targetFlag''' is a flag object.
|-valign=top
|-valign=top
|'''Example''':             ||westSoldierOne action ["cancelTakeFlag", eastFlag]
| '''Example''':
| <sqf>westSoldierOne action ["cancelTakeFlag", eastFlag]</sqf>
|}
|}


Line 75: Line 93:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a unit to deactivate and take a active satchel charge placed by any unit. This action can be performed upon a satchel object from any distance.  
|'''Description''':
| Causes a unit to deactivate and take a active satchel charge placed by any unit. This action can be performed upon a satchel object from any distance.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["deactivate", ''targetUnit'', ''targetObject'']
|'''Syntax''':
| ''unit'' action ["deactivate", ''targetUnit'', ''targetObject'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (they will perform the action animation as if deactivating a satchel charge). ''targetUnit'' will have the deactivated satchel charge added to it's inventory. ''targetObject'' is the armed satchel object to be deactivated (class "pipeBomb" or "timeBomb").
|
| Where ''unit'' is any unit (they will perform the action animation as if deactivating a satchel charge). ''targetUnit'' will have the deactivated satchel charge added to it is inventory. ''targetObject'' is the armed satchel object to be deactivated (class "pipeBomb" or "timeBomb").
|-valign=top
|-valign=top
|'''Examples''':             ||soldierOne action ["deactivate", soldierOne, mySatchelCharge]
| '''Examples''':
|-valign=top
| <sqf>
|                            ||soldierOne action ["deactivate", soldierOne, nearestObject [soldierOne, "pipeBomb"]]
soldierOne action ["deactivate", soldierOne, mySatchelCharge]
soldierOne action ["deactivate", soldierOne, nearestObject [soldierOne, "pipeBomb"]]
</sqf>
 
|}
|}


Line 90: Line 114:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a unit to deactivate any armed landmine that is within about two meters of a unit. Neither unit requires the ability to disable landmines.
|'''Description''':
| Causes a unit to deactivate any armed landmine that is within about two meters of a unit. Neither unit requires the ability to disable landmines.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["deactivateMine", ''targetUnit'']
|'''Syntax''':
| ''unit'' action ["deactivateMine", ''targetUnit'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit, who will perform the action animation. The closest landmine to ''targetUnit'' will be deactivated.
|
| Where ''unit'' is any unit, who will perform the action animation. The closest landmine to ''targetUnit'' will be deactivated.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["deactivateMine", soldierOne]
| '''Example''':
| <sqf>soldierOne action ["deactivateMine", soldierOne]</sqf>
|}
|}


Line 103: Line 131:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Use and effects unknown.
|'''Description''':
| Use and effects unknown.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["diary", ''<target>'']
|'''Syntax''':
| ''unit'' action ["diary", ''<target>'']
|-valign=top
|-valign=top
|                           ||
|
|
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 116: Line 148:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Causes a person to drop a magazine either into another unit (both persons and vehicles), or onto the ground (creating a new WeaponHolder object). Magazines can be dropped into other units at any distance.
|'''Description''':
| Causes a person to drop a magazine either into another unit (both persons and vehicles), or onto the ground (creating a new WeaponHolder object). Magazines can be dropped into other units at any distance.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["dropMagazine", ''targetUnit'', ''"magazineName"'']
|'''Syntax''':
| ''unit'' action ["dropMagazine", ''targetUnit'', ''"magazineName"'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to drop a magazine (the action animation will be performed), ''targetUnit'' is either another unit into which the magazine will be dropped, or the same unit that is dropping the magazine. ''"magazineName"'' is the classname (string) of the magazine to be dropped (see the [[ArmA:_Weapons|ArmA weapons list]] for magazine classnames).
|
| Where ''unit'' is the person to drop a magazine (the action animation will be performed), ''targetUnit'' is either another unit into which the magazine will be dropped, or the same unit that is dropping the magazine. ''"magazineName"'' is the classname (string) of the magazine to be dropped (see the [[ArmA:_Weapons|ArmA weapons list]] for magazine classnames).
|-valign=top
|-valign=top
|'''Examples''':             ||soldierOne action ["dropMagazine", soldierOne, "30Rnd_545x39_AK"]
| '''Examples''':
|-valign=top
| <sqf>
|                            ||soldierOne action ["dropMagazine", ammoCrateOne, "30Rnd_545x39_AK"]
soldierOne action ["dropMagazine", soldierOne, "30Rnd_545x39_AK"]
soldierOne action ["dropMagazine", ammoCrateOne, "30Rnd_545x39_AK"]
</sqf>
 
|}
|}


Line 131: Line 169:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to drop a weapon and all associated magazines either into another unit (including persons and vehicles), or onto the ground (creating a new WeaponHolder object). Weapons can be dropped into other units at any distance.
|'''Description''':
| Causes a person to drop a weapon and all associated magazines either into another unit (including persons and vehicles), or onto the ground (creating a new WeaponHolder object). Weapons can be dropped into other units at any distance.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["dropWeapon", ''targetUnit'', ''"weaponName"'']
|'''Syntax''':
| ''unit'' action ["dropWeapon", ''targetUnit'', ''"weaponName"'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to drop a weapon (the action animation will be performed), ''targetUnit'' is either another unit into which the weapon will be dropped, or the same unit that is dropping the weapon to place it onto the ground. ''"weaponName"'' is the classname (string) of the weapon to be dropped (see the [[ArmA:_Weapons|ArmA weapons list]] for classnames).
|
| Where ''unit'' is the person to drop a weapon (the action animation will be performed), ''targetUnit'' is either another unit into which the weapon will be dropped, or the same unit that is dropping the weapon to place it onto the ground. ''"weaponName"'' is the classname (string) of the weapon to be dropped (see the [[ArmA:_Weapons|ArmA weapons list]] for classnames).
|-valign=top
|-valign=top
|'''Examples''':             ||soldierOne action ["dropWeapon", soldierOne, "AK74GL"]
| '''Examples''':
|-valign=top
| <sqf>
|                            ||soldierOne action ["dropWeapon", ammoCrateOne, "RPG7V"]
soldierOne action ["dropWeapon", soldierOne, "AK74GL"]
soldierOne action ["dropWeapon", ammoCrateOne, "RPG7V"]
</sqf>
 
|}
|}


Line 146: Line 190:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to eject out of the vehicle they are currently inside. If the unit was the driver of the vehicle, the vehicle will retain it's steering control input and it's engine will remain on. This action has a global effect when used on a local unit in multiplayer. If the vehicle parameter used is an moving aircraft, the ejecting person will use a parachute (and likewise if it is not an moving aircraft, no parachute will be used).
|'''Description''':
| Causes a person to eject out of the vehicle they are currently inside. If the unit was the driver of the vehicle, the vehicle will retain it is steering control input and it is engine will remain on. This action has a global effect when used on a local unit in multiplayer. If the vehicle parameter used is an moving aircraft, the ejecting person will use a parachute (and likewise if it is not an moving aircraft, no parachute will be used).
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["eject", ''vehicle'']
|'''Syntax''':
| ''unit'' action ["eject", ''vehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to eject from their current vehicle, and ''vehicle'' is any vehicle (generally the vehicle ''unit'' is within).
|
| Where ''unit'' is the person to eject from their current vehicle, and ''vehicle'' is any vehicle (generally the vehicle ''unit'' is within).
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["EJECT", vehicle soldierOne]
| '''Example''':
| <sqf>soldierOne action ["EJECT", vehicle soldierOne]</sqf>
|}
|}


Line 159: Line 207:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Turns a vehicle's engine on. This command will not override an AI driver's desires.
|'''Description''':
| Turns a vehicle's engine on. This command will not override an AI driver's desires.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["engineOn", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["engineOn", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit, and ''targetVehicle'' is the vehicle to start it's engine.
|
| Where ''unit'' is any unit, and ''targetVehicle'' is the vehicle to start it is engine.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["engineOn", vehicle soldierOne]
| '''Example''':
| <sqf>soldierOne action ["engineOn", vehicle soldierOne]</sqf>
|}
|}


Line 172: Line 224:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Turns a vehicle's engine off. This command will not override an AI driver's desires.
|'''Description''':
| Turns a vehicle's engine off. This command will not override an AI driver's desires.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["engineOff", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["engineOff", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit, and ''targetVehicle'' is the vehicle to have it's engine turned off.
|
| Where ''unit'' is any unit, and ''targetVehicle'' is the vehicle to have it is engine turned off.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["engineOff", vehicle soldierOne]
| '''Example''':
| <sqf>soldierOne action ["engineOff", vehicle soldierOne]</sqf>
|}
|}


Line 186: Line 242:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Ignites a fireplace object (from any distance).
|'''Description''':
| Ignites a fireplace object (from any distance).
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["fireInFlame", ''targetObject'']
|'''Syntax''':
| ''unit'' action ["fireInFlame", ''targetObject'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit(the action animation will be performed), and ''targetObject'' is the fireplace to be ignited.
|
| Where ''unit'' is any unit(the action animation will be performed), and ''targetObject'' is the fireplace to be ignited.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["fireInFlame", firePlaceOne]
| '''Example''':
| <sqf>soldierOne action ["fireInFlame", firePlaceOne]</sqf>
|}
|}


Line 199: Line 259:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Extinguishes a fireplace object (from any distance).
|'''Description''':
| Extinguishes a fireplace object (from any distance).
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["firePutDown", ''targetObject'']
|'''Syntax''':
| ''unit'' action ["firePutDown", ''targetObject'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (the action animation will be performed), and ''targetObject'' is the fireplace to be extinguished.
|
| Where ''unit'' is any unit (the action animation will be performed), and ''targetObject'' is the fireplace to be extinguished.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["firePutDown", firePlaceOne]
| '''Example''':
| <sqf>soldierOne action ["firePutDown", firePlaceOne]</sqf>
|}
|}


Line 213: Line 277:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Adjusts an aircraft's flaps upwards one notch. AI pilot's will instantly adjust their flaps to whatever setting they feel is suitable.
|'''Description''':
| Adjusts an aircraft's flaps upwards one notch. AI pilot's will instantly adjust their flaps to whatever setting they feel is suitable.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["flapsUp", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["flapsUp", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (the action animation will not be performed), and ''targetVehicle'' is the aircraft to have it's flaps adjusted.  
|
| Where ''unit'' is any unit (the action animation will not be performed), and ''targetVehicle'' is the aircraft to have it is flaps adjusted.
|-valign=top
|-valign=top
|'''Example''':             ||harrierOne action ["flapsUp", harrierOne]
| '''Example''':
| <sqf>harrierOne action ["flapsUp", harrierOne]</sqf>
|}
|}


Line 226: Line 294:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Adjusts an aircraft's flaps down one notch. AI pilot's will instantly adjust their flaps to whatever setting they feel is suitable.
|'''Description''':
| Adjusts an aircraft's flaps down one notch. AI pilot's will instantly adjust their flaps to whatever setting they feel is suitable.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["flapsDown", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["flapsDown", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (the action animation will not be performed), and ''targetVehicle'' is the aircraft to have it's flaps adjusted.  
|
| Where ''unit'' is any unit (the action animation will not be performed), and ''targetVehicle'' is the aircraft to have it is flaps adjusted.
|-valign=top
|-valign=top
|'''Example''':             ||harrierOne action ["flapsDown", harrierOne]
| '''Example''':
| <sqf>harrierOne action ["flapsDown", harrierOne]</sqf>
|}
|}


== Gear ==
== Gear ==
'''unitName action ["GEAR",<target unit>]'''<br>
'''unitName action ["GEAR",<target unit>]'''
'''unitName action ["GEAR",<target unit>]'''


UnitName opens the gear of <target unit> (but only if he is within normal range) and plays the "pick up" animation, allowing transfer of gear between the two units. This works even if <target unit> does not normally have a gear action (for instance between two soldiers). Using "" or ObjNull for <target unit> will drop the gear on the ground, but it will take a little while before the game recognizes the weapon holder.
UnitName opens the gear of <target unit> (but only if he is within normal range) and plays the "pick up" animation, allowing transfer of gear between the two units. This works even if <target unit> does not normally have a gear action (for instance between two soldiers). Using "" or ObjNull for <target unit> will drop the gear on the ground, but it will take a little while before the game recognizes the weapon holder.


Example:
Example:
<code>SoldierOne action ["GEAR", SoldierTwo]</code>
<sqf>SoldierOne action ["GEAR", SoldierTwo]</sqf>


== GetInCargo ==
== GetInCargo ==
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Instantly moves a person to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as cargo, in a specific cargo position if given as an optional parameter, otherwise in the first available cargo position. If the specific position is already occupied, the person will board in the first available cargo position. If the all cargo positions are already occupied by living persons, or no cargo position exists, the boarding will fail.
|'''Description''':
| Instantly moves a person to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as cargo, in a specific cargo position if given as an optional parameter, otherwise in the first available cargo position. If the specific position is already occupied, the person will board in the first available cargo position. If the all cargo positions are already occupied by living persons, or no cargo position exists, the boarding will fail.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["getInCargo", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["getInCargo", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||''unit'' action ["getInCargo", ''targetVehicle'', ''positionNumber'']
|
| ''unit'' action ["getInCargo", ''targetVehicle'', ''positionNumber'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded. ''positionNumber is a specific cargo position index number.
|
| Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded. ''positionNumber is a specific cargo position index number.
|-valign=top
|-valign=top
|'''Examples''':             ||soldierOne action ["getInCargo", truckOne]
| '''Examples''':
|-valign=top
| <sqf>
|                            ||soldierOne action ["getInCargo", truckOne, 0]
soldierOne action ["getInCargo", truckOne]
soldierOne action ["getInCargo", truckOne, 0]
</sqf>
 
|}
|}


Line 264: Line 342:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, they then attempt to board the vehicle as the commander. The boarding will fail if the position is already occupied or does not exist.
|'''Description''':
| Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, they then attempt to board the vehicle as the commander. The boarding will fail if the position is already occupied or does not exist.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["getInCommmander", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["getInCommmander", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded.  
|
| Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["getInCommmander", tankOne]
| '''Example''':
| <sqf>soldierOne action ["getInCommmander", tankOne]</sqf>
|}
|}


Line 277: Line 359:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Instantly moves an person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the driver/pilot. The boarding will fail if the position is already occupied or does not exist.
|'''Description''':
| Instantly moves an person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the driver/pilot. The boarding will fail if the position is already occupied or does not exist.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["getInDriver", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["getInDriver", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded.  
|
| Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["getInDriver", carOne]
| '''Example''':
| <sqf>soldierOne action ["getInDriver", carOne]</sqf>
|}
|}


Line 290: Line 376:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the primary gunner. If the gunner position is already occupied by another living person or it does not exist, the boarding will fail. Also see [[#GetInTurret|getInTurret]].
|'''Description''':
| Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the primary gunner. If the gunner position is already occupied by another living person or it does not exist, the boarding will fail. Also see [[#GetInTurret|getInTurret]].
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["getInGunner", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["getInGunner", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded.  
|
| Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["getInGunner", mySpotlight]
| '''Example''':
| <sqf>soldierOne action ["getInGunner", mySpotlight]</sqf>
|}
|}


Line 303: Line 393:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || This action is identical to [[#GetInDriver|getInDriver]]. It instantly moves an person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the driver/pilot. The boarding will fail if the position is already occupied or does not exist.
|'''Description''':
| This action is identical to [[#GetInDriver|getInDriver]]. It instantly moves an person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the driver/pilot. The boarding will fail if the position is already occupied or does not exist.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["getInPilot", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["getInPilot", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded.  
|
| Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded.
|-valign=top
|-valign=top
|'''Example''':             ||pilotOne action ["getInPilot", chopperOne]
| '''Example''':
| <sqf>pilotOne action ["getInPilot", chopperOne]</sqf>
|}
|}


Line 316: Line 410:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         || Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the specified turret user. If the turret position is already occupied by another living person the boarding will fail. If the turret position does not exist, ArmA may crash (no longer true for Arma 2 / OA). See also [[#GetInGunner|getInGunner]].
|'''Description''':
| Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the specified turret user. If the turret position is already occupied by another living person the boarding will fail. If the turret position does not exist, ArmA may crash (no longer true for Arma 2 / OA). See also [[#GetInGunner|getInGunner]].
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["getInTurret", ''targetVehicle'', ''turretArray'']
|'''Syntax''':
| ''unit'' action ["getInTurret", ''targetVehicle'', ''turretArray'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded, and ''turretArray'' is an array defining the turret. For example, ''[1]'' would be a vehicle's second turret, and ''[0, 2, 1]'' is the second turret of the third turret of the first turret. A vehicle's turret order is defined in it's class CfgVehicles of the Config.
|
| Where ''unit'' is the person to board, and ''targetVehicle'' is the vehicle to be boarded, and ''turretArray'' is an array defining the turret. For example, ''[1]'' would be a vehicle's second turret, and ''[0, 2, 1]'' is the second turret of the third turret of the first turret. A vehicle's turret order is defined in it is class CfgVehicles of the Config.
|-valign=top
|-valign=top
|'''Examples''':             ||gunnerTwo action ["getInTurret", myUH60MG, [1]]
| '''Examples''':
|-valign=top
| <sqf>
|                            ||tankCommanderOne action ["getInTurret", myT72, [0,1]]
gunnerTwo action ["getInTurret", myUH60MG, [1]]
tankCommanderOne action ["getInTurret", myT72, [0,1]]
</sqf>
 
|}
|}


Line 330: Line 430:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to disembark from a vehicle, without a parachute in the case of aircraft. See also [[#Eject|eject]].
|'''Description''':
| Causes a person to disembark from a vehicle, without a parachute in the case of aircraft. See also [[#Eject|eject]].
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["getOut", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["getOut", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the person to disembark, and ''targetVehicle'' is the vehicle to disembark from.
|
| Where ''unit'' is the person to disembark, and ''targetVehicle'' is the vehicle to disembark from.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["getOut", carOne]
| '''Example''':
| <sqf>soldierOne action ["getOut", carOne]</sqf>
|}
|}


Line 343: Line 447:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to ready their hand gun (if equiped). This action may not work if the unit does not have a primary rifle.
|'''Description''':
| Causes a person to ready their hand gun (if equiped). This action may not work if the unit does not have a primary rifle.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["handGunOn", ''targetUnit'']
|'''Syntax''':
| ''unit'' action ["handGunOn", ''targetUnit'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (who will not play the action animation), and ''targetUnit'' is the unit who will ready their pistol.
|
| Where ''unit'' is any unit (who will not play the action animation), and ''targetUnit'' is the unit who will ready their pistol.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["handGunOn", soldierOne]
| '''Example''':
| <sqf>soldierOne action ["handGunOn", soldierOne]</sqf>
|}
|}


Line 356: Line 464:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to return a readied pistol to it's holster, then switch to the primary rifle. This action may not work if the unit does not have a primary rifle.  
|'''Description''':
| Causes a person to return a readied pistol to it is holster, then switch to the primary rifle. This action may not work if the unit does not have a primary rifle.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["handGunOff", ''targetUnit'']
|'''Syntax''':
| ''unit'' action ["handGunOff", ''targetUnit'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (who will not play the action animation), and ''targetUnit'' is the person to holster it's pistol.
|
| Where ''unit'' is any unit (who will not play the action animation), and ''targetUnit'' is the person to holster it is pistol.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["handGunOff", soldierOne]
| '''Example''':
| <sqf>soldierOne action ["handGunOff", soldierOne]</sqf>
|}
|}


Line 369: Line 481:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Instantly teleports a person unit to the target medic. The target medic then heals the unit. If the target unit is not a medic, the animations will still be played, but no healing occurs. If the medic is within a vehicle, no teleporting will occur and the wounded unit will only be healed if they are already within healing range (a few meters).
|'''Description''':
| Instantly teleports a person unit to the target medic. The target medic then heals the unit. If the target unit is not a medic, the animations will still be played, but no healing occurs. If the medic is within a vehicle, no teleporting will occur and the wounded unit will only be healed if they are already within healing range (a few meters).
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["heal", ''targetUnit'']
|'''Syntax''':
| ''unit'' action ["heal", ''targetUnit'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is a wounded person, and ''targetUnit'' is the medic to do the healing.  
|
| Where ''unit'' is a wounded person, and ''targetUnit'' is the medic to do the healing.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["heal", medicOne]
| '''Example''':
| <sqf>soldierOne action ["heal", medicOne]</sqf>
|}
|}


Line 382: Line 498:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to bend down and hide (bury) a body in the ground. The body is automatically deleted within a few seconds. The person performing the action does not require the ability to hide bodies, and may be any distance from the body.
|'''Description''':
| Causes a person to bend down and hide (bury) a body in the ground. The body is automatically deleted within a few seconds. The person performing the action does not require the ability to hide bodies, and may be any distance from the body.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["hideBody", ''targetUnit'']
|'''Syntax''':
| ''unit'' action ["hideBody", ''targetUnit'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is a person, and ''targetUnit'' is a dead person.  
|
| Where ''unit'' is a person, and ''targetUnit'' is a dead person.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["hideBody", soldierTwo]
| '''Example''':
| <sqf>soldierOne action ["hideBody", soldierTwo]</sqf>
|}
|}


Line 395: Line 515:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Use and effects unknown.
|'''Description''':
| Use and effects unknown.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["inGameMenu", ''<target>'']
|'''Syntax''':
| ''unit'' action ["inGameMenu", ''<target>'']
|-valign=top
|-valign=top
|                           ||
|
|
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 408: Line 532:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to play an animation as if mounting the top of a ladder, then instantly teleport onto the specified ladder in the specified position. If the person is controlled by AI, they will automatically climb up or down the ladder. If the 2 parameter syntax is used, the person will become stuck in the ladder mounting animation state until the [[#ladderOff|ladderOff]] action is executed upon them. It may also crash ArmA (pre 1.09).
|'''Description''':
| Causes a person to play an animation as if mounting the top of a ladder, then instantly teleport onto the specified ladder in the specified position. If the person is controlled by AI, they will automatically climb up or down the ladder. If the 2 parameter syntax is used, the person will become stuck in the ladder mounting animation state until the [[#ladderOff|ladderOff]] action is executed upon them. It may also crash ArmA (pre 1.09).
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["ladderDown", ''targetObject'']
|'''Syntax''':
| ''unit'' action ["ladderDown", ''targetObject'']
|-valign=top
|-valign=top
|                           ||''unit'' action ["ladderDown", ''targetObject'', ''ladderNumber'', ''positionNumber'']
|
| ''unit'' action ["ladderDown", ''targetObject'', ''ladderNumber'', ''positionNumber'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any person unit, ''targetObject'' is an object with a ladder, ''ladderNumber'' is a number defining the desired ladder, and ''positionNumber'' is a number defining the desired position.
|
| Where ''unit'' is any person unit, ''targetObject'' is an object with a ladder, ''ladderNumber'' is a number defining the desired ladder, and ''positionNumber'' is a number defining the desired position.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["ladderDown", (position soldierOne nearestObject 452221), 0, 1]
| '''Example''':
| <sqf>soldierOne action ["ladderDown", (position soldierOne nearestObject 452221), 0, 1]</sqf>
|}
|}


Line 423: Line 552:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to play an animation as if mounting the bottom of a ladder, then instantly teleport onto the specified ladder in the specified position. If the person is controlled by AI, they will automatically climb up or down the ladder. If the 2 parameter syntax is used, the person will become stuck in the ladder mounting animation state until the [[#ladderOff|ladderOff]] action is executed upon them. It may also crash ArmA (pre 1.09).
|'''Description''':
| Causes a person to play an animation as if mounting the bottom of a ladder, then instantly teleport onto the specified ladder in the specified position. If the person is controlled by AI, they will automatically climb up or down the ladder. If the 2 parameter syntax is used, the person will become stuck in the ladder mounting animation state until the [[#ladderOff|ladderOff]] action is executed upon them. It may also crash ArmA (pre 1.09).
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["ladderUp", ''targetObject'']
|'''Syntax''':
| ''unit'' action ["ladderUp", ''targetObject'']
|-valign=top
|-valign=top
|                           ||''unit'' action ["ladderUp", ''targetObject'', ''ladderNumber'', ''positionNumber'']
|
| ''unit'' action ["ladderUp", ''targetObject'', ''ladderNumber'', ''positionNumber'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any person unit, ''targetObject'' is an object with a ladder, ''ladderNumber'' is a number defining the desired ladder, and ''positionNumber'' is a number defining the desired position.
|
| Where ''unit'' is any person unit, ''targetObject'' is an object with a ladder, ''ladderNumber'' is a number defining the desired ladder, and ''positionNumber'' is a number defining the desired position.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["ladderUp", (position soldierOne nearestObject 452221), 0, 0]
| '''Example''':
| <sqf>soldierOne action ["ladderUp", (position soldierOne nearestObject 452221), 0, 0]</sqf>
|}
|}


Line 438: Line 572:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to dismount from any ladder of the specified object they may be happen to be on. The alternative 3 parameter syntax expects a number, the use of which is not known.
|'''Description''':
| Causes a person to dismount from any ladder of the specified object they may be happen to be on. The alternative 3 parameter syntax expects a number, the use of which is not known.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["ladderOff", ''targetObject'']
|'''Syntax''':
| ''unit'' action ["ladderOff", ''targetObject'']
|-valign=top
|-valign=top
|                           ||''unit'' action ["ladderDown", ''targetObject'', ''unknownNumber'']
|
| ''unit'' action ["ladderDown", ''targetObject'', ''unknownNumber'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any person unit, ''targetObject'' is the object with a ladder that the person is currently upon, ''unknownNumber'' is a number.
|
| Where ''unit'' is any person unit, ''targetObject'' is the object with a ladder that the person is currently upon, ''unknownNumber'' is a number.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["ladderOff", (position soldierOne nearestObject 452221)]
| '''Example''':
| <sqf>soldierOne action ["ladderOff", (position soldierOne nearestObject 452221)]</sqf>
|}
|}


Line 453: Line 592:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         This action appears to be identical to [[#LadderDown|LadderDown]].
|'''Description''': This action appears to be identical to [[#LadderDown|LadderDown]].
|}
|}


Line 460: Line 599:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         This action appears to be identical to [[#LadderUp|LadderUp]].
|'''Description''': This action appears to be identical to [[#LadderUp|LadderUp]].
|}
|}


Line 467: Line 606:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Turns on autopilot landing for an aircraft, including AI controlled aircraft. The aircraft will land at the closest airfield.
|'''Description''':
| Turns on autopilot landing for an aircraft, including AI controlled aircraft. The aircraft will land at the closest airfield.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["Land", ''targetVehicle'']'''
|'''Syntax''':
| ''unit'' action ["Land", ''targetVehicle'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle that can perform an autopilot landing.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle that can perform an autopilot landing.
|-valign=top
|-valign=top
|'''Example''':             ||planeOne action ["Land", planeOne]
| '''Example''':
| <sqf>planeOne action ["Land", planeOne]</sqf>
|}
|}


Line 481: Line 624:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Lowers the landing gear of an aircraft. Only works on player controlled aircraft.
|'''Description''':
| Lowers the landing gear of an aircraft. Only works on player controlled aircraft.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["LandGear", ''targetVehicle'']'''
|'''Syntax''':
| ''unit'' action ["LandGear", ''targetVehicle'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle that can perform an autopilot landing.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle that can perform an autopilot landing.
|-valign=top
|-valign=top
|'''Example''':             ||planeOne action ["LandGear", planeOne]
| '''Example''':
| <sqf>planeOne action ["LandGear", planeOne]</sqf>
|}
|}


Line 494: Line 641:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Raises the landing gear of an aircraft. Only works on player controlled aircraft.
|'''Description''':
| Raises the landing gear of an aircraft. Only works on player controlled aircraft.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["LandGearUp", ''targetVehicle'']'''
|'''Syntax''':
| ''unit'' action ["LandGearUp", ''targetVehicle'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle that can perform an autopilot landing.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle that can perform an autopilot landing.
|-valign=top
|-valign=top
|'''Example''':             ||planeOne action ["LandGearUp", planeOne]
| '''Example''':
| <sqf>planeOne action ["LandGearUp", planeOne]</sqf>
|}
|}


Line 507: Line 658:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Turns off the headlights of an empty vehicle. If the vehicle is AI-controlled (either as the lone driver, or as the commander/gunner) then the light status depends on the AI's [[behaviour]] mode ("combat" or "stealth" = lights off, any other mode = lights on).
|'''Description''':
| Turns off the headlights of an empty vehicle. If the vehicle is AI-controlled (either as the lone driver, or as the commander/gunner) then the light status depends on the AI's [[behaviour]] mode ("combat" or "stealth" = lights off, any other mode = lights on).
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["lightOff", ''targetVehicle'']'''
|'''Syntax''':
| ''unit'' action ["lightOff", ''targetVehicle'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle with lights.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle with lights.
|-valign=top
|-valign=top
|'''Example''':             ||player action ["lightOff", vehicle player]
| '''Example''':
| <sqf>player action ["lightOff", vehicle player]</sqf>
|}
|}


Line 520: Line 675:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Turns on the headlights of an empty vehicle. If vehicle is AI-controlled, see notes under the [[ArmA:_Actions#LightOff|LightOff]] action.
|'''Description''':
| Turns on the headlights of an empty vehicle. If vehicle is AI-controlled, see notes under the [[ArmA:_Actions#LightOff|LightOff]] action.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["lightOn", ''targetVehicle'']'''
|'''Syntax''':
| ''unit'' action ["lightOn", ''targetVehicle'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle with lights.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is a vehicle with lights.
|-valign=top
|-valign=top
|'''Example''':             ||player action ["lightOn", spotLight]
| '''Example''':
| <sqf>player action ["lightOn", spotLight]</sqf>
|}
|}


Line 533: Line 692:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Use and effects unknown.
|'''Description''':
| Plays a reload weapon animation.
|-valign=top
|'''Syntax''':
| ''unit'' action ["loadMagazine", <target>, <magazine creator>, <number>, <number> ,<weapon name>, <muzzle name>]
|-valign=top
|
| # <target>: Unit to perform the reload action.
|-valign=top
|
| # <magazine creator>: Unknown. Can be objNull.
|-valign=top
|
| # <number>: Unknown. It seems it must be 0 to work.
|-valign=top
|
| # <number>: Unknown. With 0, it only plays the reload animation. With values from 1 up, it actually reloads the magazine. If the number becomes too high (meaning of the upper limit is also unknown), the action will no longer be performed.
|-valign=top
|-valign=top
|'''Syntax''':              ||Unknown, something like - ''unit'' action ["loadMagazine", <target>, <magazine creator>, <number>, <number> ,<weapon name>, <muzzle name>]
|
| # <weapon name>: Weapon to reload. Must not be selected, but may cause weapon not to reload to the full amount.
|-valign=top
|-valign=top
|                           ||Expects a 7 element array. ArmA crashes when given incompatible syntax or data with this action, making it hard to test.
|
| # <muzzle name>: Weapon's muzzle to reload.
|-valign=top
|-valign=top
|'''Example''':             ||player action ["loadmagazine",player, player, 0, 1 ,"vbs2_us_m16a2_iron_gla", "vbs2_us_m16a2_iron_gla"]  
|
| Expects a 7 element array. ArmA crashes when given incompatible syntax or data with this action, making it hard to test (fixed in OA v1.60).
|-valign=top
| '''Example''':
| <sqf>player action ["loadmagazine",player, player, 0, 1 ,"vbs2_us_m16a2_iron_gla", "vbs2_us_m16a2_iron_gla"]</sqf>
|}
|}


== ManualFire ==
== ManualFire ==
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Enables manual fire mode for a player unit that is driver or commander of a vehicle. This action toggled manual fire mode in old versions of ArmA.  
|'''Description''':
| Enables manual fire mode for a player unit that is driver or commander of a vehicle. This action toggled manual fire mode in old versions of ArmA.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["manualFire", ''targetVehicle'']'''
|'''Syntax''':
| ''unit'' action ["manualFire", ''targetVehicle'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is the vehicle in which manual fire mode is to be enabled.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is the vehicle in which manual fire mode is to be enabled.
|-valign=top
|-valign=top
|'''Example''':             ||player action ["MANUALFIRE", vehicle player]
| '''Example''':
| <sqf>player action ["MANUALFIRE", vehicle player]</sqf>
|}
|}


Line 559: Line 743:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Disables manual fire mode for a player unit that is driver or commander of a vehicle.
|'''Description''':
| Disables manual fire mode for a player unit that is driver or commander of a vehicle.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["manualFireCancel", ''targetVehicle'']'''
|'''Syntax''':
| ''unit'' action ["manualFireCancel", ''targetVehicle'']'''
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is the vehicle in which manual fire mode is to be disabled.
|
| Where ''unit'' is any unit (no action animation is performed) and ''targetVehicle'' is the vehicle in which manual fire mode is to be disabled.
|-valign=top
|-valign=top
|'''Example''':             ||player action ["manualFireCancel", vehicle player]
| '''Example''':
| <sqf>player action ["manualFireCancel", vehicle player]</sqf>
|}
|}


Line 572: Line 760:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Use and effects unknown.
|'''Description''':
| Use and effects unknown.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["markEntity", <target>]
|'''Syntax''':
| ''unit'' action ["markEntity", <target>]
|-valign=top
|-valign=top
|                           ||
|
|
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 585: Line 777:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Move a unit to the chosen cargo position within a vehicle. If another unit is already in that position, the units will swap positions. (possibly alternate syntax to place unit in first empty cargo position?)
|'''Description''':
| Move a unit to the chosen cargo position within a vehicle. If another unit is already in that position, the units will swap positions. (possibly alternate syntax to place unit in first empty cargo position?)
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["moveToCargo", ''targetVehicle'', ''cargoPosition'']
|'''Syntax''':
| ''unit'' action ["moveToCargo", ''targetVehicle'', ''cargoPosition'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is a unit within ''targetVehicle'', and ''cargoPosition'' is the number of the desired cargo position (0 being the first).
|
| Where ''unit'' is a unit within ''targetVehicle'', and ''cargoPosition'' is the number of the desired cargo position (0 being the first).
|-valign=top
|-valign=top
|'''Example''':             ||player action ["moveToCargo", vehicle player, 2]
| '''Example''':
| <sqf>player action ["moveToCargo", vehicle player, 2]</sqf>
|}
|}


Line 598: Line 794:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Move a unit to the commander's position within a vehicle. If another unit is already in that position, the units will swap positions.
|'''Description''':
| Move a unit to the commander's position within a vehicle. If another unit is already in that position, the units will swap positions.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["moveToCommander", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["moveToCommander", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is a unit within ''targetVehicle''.
|
| Where ''unit'' is a unit within ''targetVehicle''.
|-valign=top
|-valign=top
|'''Example''':             ||player action ["moveToCommander", vehicle player]
| '''Example''':
| <sqf>player action ["moveToCommander", vehicle player]</sqf>
|}
|}


Line 611: Line 811:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Move a unit to the driver's position within a vehicle. If another unit is already in that position, the units will generally swap positions, although in some scenarios this action may not work (although having the existing driver move always works).
|'''Description''':
| Move a unit to the driver's position within a vehicle. If another unit is already in that position, the units will generally swap positions, although in some scenarios this action may not work (although having the existing driver move always works).
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["moveToDriver", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["moveToDriver", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is a unit within ''targetVehicle''.
|
| Where ''unit'' is a unit within ''targetVehicle''.
|-valign=top
|-valign=top
|'''Example''':             ||player action ["moveToDriver", vehicle player]
| '''Example''':
| <sqf>player action ["moveToDriver", vehicle player]</sqf>
|}
|}


Line 624: Line 828:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Move a unit to the primary gunner's position within a vehicle. If another unit is already in that position, the units will swap positions. See also [[#MoveToTurret|moveToTurret]].
|'''Description''':
| Move a unit to the primary gunner's position within a vehicle. If another unit is already in that position, the units will swap positions. See also [[#MoveToTurret|moveToTurret]].
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["moveToGunner", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["moveToGunner", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is a unit within ''targetVehicle''.
|
| Where ''unit'' is a unit within ''targetVehicle''.
|-valign=top
|-valign=top
|'''Example''':             ||player action ["moveToGunner", vehicle player]
| '''Example''':
| <sqf>player action ["moveToGunner", vehicle player]</sqf>
|}
|}


Line 637: Line 845:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         Identical to [[#MoveToDriver|moveToDriver]].
|'''Description''': Identical to [[#MoveToDriver|moveToDriver]].
|}
|}


Line 644: Line 852:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Move a unit to the chosen turret position within a vehicle. If another unit is already in that position, the units will swap positions.
|'''Description''':
| Move a unit to the chosen turret position within a vehicle. If another unit is already in that position, the units will swap positions.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["moveToTurret", ''targetVehicle'', ''turretArray'']
|'''Syntax''':
| ''unit'' action ["moveToTurret", ''targetVehicle'', ''turretArray'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is a unit within ''targetVehicle'', and ''turret Array'' is an array referring to the desired turret (for example, [0,1,2] refers to the third turret of the second turret of the first turret of the vehicle).
|
| Where ''unit'' is a unit within ''targetVehicle'', and ''turret Array'' is an array referring to the desired turret (for example, [0,1,2] refers to the third turret of the second turret of the first turret of the vehicle).
|-valign=top
|-valign=top
|'''Examples''':             ||player action ["moveToTurret", vehicle player, [0]]
| '''Examples''':
|-valign=top
| <sqf>
|                            ||player action ["moveToTurret", vehicle player, [0,1]]
player action ["moveToTurret", vehicle player, [0]]
player action ["moveToTurret", vehicle player, [0,1]]
</sqf>
 
|}
|}


Line 659: Line 873:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Use and effects unknown.
|'''Description''':
| Use and effects unknown.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["none", ''<target>'']
|'''Syntax''':
| ''unit'' action ["none", ''<target>'']
|-valign=top
|-valign=top
|                           ||
|
|
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 672: Line 890:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a unit to put on it's night vision goggles. AI controlled units will automatically put on and take off goggles depending on daylight.
|'''Description''':
| Causes a unit to put on it is night vision goggles. AI controlled units will automatically put on and take off goggles depending on daylight.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["nvGoggles", ''<anything>'']
|'''Syntax''':
| ''unit'' action ["nvGoggles", ''<anything>'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the unit to put on NVGoggles, and ''<anything>'' can be anything (it seems to not be used at all, but the action parameter array must contain at least two elements).
|
| Where ''unit'' is the unit to put on NVGoggles, and ''<anything>'' can be anything (it seems to not be used at all, but the action parameter array must contain at least two elements).
|-valign=top
|-valign=top
|'''Example''':             ||player action ["nvGoggles", player]
| '''Example''':
| <sqf>player action ["nvGoggles", player]</sqf>
|}
|}


Line 685: Line 907:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a unit to take off it's night vision goggles. AI controlled units will automatically put on and take off goggles depending on daylight.
|'''Description''':
| Causes a unit to take off it is night vision goggles. AI controlled units will automatically put on and take off goggles depending on daylight.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["nvGogglesOff", ''<anything>'']
|'''Syntax''':
| ''unit'' action ["nvGogglesOff", ''<anything>'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the unit to put on goggles, and ''<anything>'' can be anything (it seems not to be used at all, but the action parameter array must contain at least two elements).
|
| Where ''unit'' is the unit to put on goggles, and ''<anything>'' can be anything (it seems not to be used at all, but the action parameter array must contain at least two elements).
|-valign=top
|-valign=top
|'''Example''':             ||player action ["nvGogglesOff", player]
| '''Example''':
| <sqf>player action ["nvGogglesOff", player]</sqf>
|}
|}


Line 698: Line 924:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes an occupied vehicle or person to rearm from any object with some ammoCargo (generally an ammo truck) in the case of vehicles, or some magazines in it's cargo in the case of a rearming person. The rearming vehicle/person can be any distance from the rearming object. Rearming vehicles takes some time and will be interrupted if the vehicle starts to move. A rearming person will bend down as if picking up something.
|'''Description''':
| Causes an occupied vehicle or person to rearm from any object with some ammoCargo (generally an ammo truck) in the case of vehicles, or some magazines in it is cargo in the case of a rearming person. The rearming vehicle/person can be any distance from the rearming object. Rearming vehicles takes some time and will be interrupted if the vehicle starts to move. A rearming person will bend down as if picking up something.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["rearm", ''reamingObject'']
|'''Syntax''':
| ''unit'' action ["rearm", ''reamingObject'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is the occupied vehicle or person to be rearmed, and ''rearmingObject'' is the object from which to rearm.
|
| Where ''unit'' is the occupied vehicle or person to be rearmed, and ''rearmingObject'' is the object from which to rearm.
|-valign=top
|-valign=top
|'''Examples''':             ||tankOne action ["rearm", ammoTruckOne]
| '''Examples''':
|-valign=top
| <sqf>
|                            ||soldierOne action ["rearm", ammoTruckOne]
tankOne action ["rearm", ammoTruckOne]
soldierOne action ["rearm", ammoTruckOne]
</sqf>
 
|}
|}


Line 713: Line 945:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes an occupied vehicle to refuel from any object with some fuelCargo (generally an refueling truck). The refueling object can be any distance from the vehicle. Refueling takes some time and will be interrupted if the vehicle starts to move.
|'''Description''':
| Causes an occupied vehicle to refuel from any object with some fuelCargo (generally an refueling truck). The refueling object can be any distance from the vehicle. Refueling takes some time and will be interrupted if the vehicle starts to move.
|-valign=top
|-valign=top
|'''Syntax''':               ||''vehicle'' action ["refuel", ''refuelingObject'']
|'''Syntax''':
| ''vehicle'' action ["refuel", ''refuelingObject'']
|-valign=top
|-valign=top
|                           ||Where ''vehicle'' is the occupied vehicle to be refueled, and ''refuelingObject'' is the object from which to refuel.
|
| Where ''vehicle'' is the occupied vehicle to be refueled, and ''refuelingObject'' is the object from which to refuel.
|-valign=top
|-valign=top
|'''Example''':             ||tankOne action ["refuel", refuelTruckOne]
| '''Example''':
| <sqf>tankOne action ["refuel", refuelTruckOne]</sqf>
|}
|}


Line 726: Line 962:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes an occupied vehicle to repair from any object with some repairCargo (generally an repair truck). The repair object can be any distance from the vehicle. Repairing takes some time and will be interrupted if the vehicle starts to move.
|'''Description''':
| Causes an occupied vehicle to repair from any object with some repairCargo (generally an repair truck). The repair object can be any distance from the vehicle. Repairing takes some time and will be interrupted if the vehicle starts to move.
|-valign=top
|-valign=top
|'''Syntax''':               ||''vehicle'' action ["repair", ''repairingObject'']
|'''Syntax''':
| ''vehicle'' action ["repair", ''repairingObject'']
|-valign=top
|-valign=top
|                           ||Where ''vehicle'' is the occupied vehicle to be repaired, and ''repairingObject'' is the object from which to repair.
|
| Where ''vehicle'' is the occupied vehicle to be repaired, and ''repairingObject'' is the object from which to repair.
|-valign=top
|-valign=top
|'''Example''':             ||tankOne action ["refuel", repairTruckOne]
| '''Example''':
| <sqf>tankOne action ["refuel", repairTruckOne]</sqf>
|}
|}


Line 739: Line 979:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to return a flag from a nearby dead person back to it's flagpole. As of ArmA v1.12 this action is bugged and can not be used upon flags attached to destroyed vehicles.
|'''Description''':
| Causes a person to return a flag from a nearby dead person back to it is flagpole. As of ArmA v1.12 this action is bugged and can not be used upon flags attached to destroyed vehicles.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["returnFlag", ''targetObject'']
|'''Syntax''':
| ''unit'' action ["returnFlag", ''targetObject'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any person, and ''targetObject'' is the dead person with a flag to be returned.  
|
| Where ''unit'' is any person, and ''targetObject'' is the dead person with a flag to be returned.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["returnFlag", westFlag]
| '''Example''':
| <sqf>soldierOne action ["returnFlag", westFlag]</sqf>
|}
|}


Line 752: Line 996:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to salute. AI controlled units will only make a momentary salute, unless the AI is in safe or careless behaviour mode.  
|'''Description''':
| Causes a person to salute. AI controlled units will only make a momentary salute, unless the AI is in safe or careless behaviour mode.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["salute", ''targetUnit'']
|'''Syntax''':
| ''unit'' action ["salute", ''targetUnit'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no animation is performed), and ''targetUnit'' is the person to make the salute.
|
| Where ''unit'' is any unit (no animation is performed), and ''targetUnit'' is the person to make the salute.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["salute", soldierOne]
| '''Example''':
| <sqf>soldierOne action ["salute", soldierOne]</sqf>
|}
|}


Line 765: Line 1,013:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.  
|'''Description''':
| There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["scudCancel", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["scudCancel", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Syntax unknown.
|
| Syntax unknown.
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 778: Line 1,030:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.  
|'''Description''':
| There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["scudLaunch", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["scudLaunch", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Syntax unknown.
|
| Syntax unknown.
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 790: Line 1,046:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.  
|'''Description''':
| There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["scudStart", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["scudStart", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Syntax unknown.
|
| Syntax unknown.
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}




== SETTIMER ==
== SETTIMER ==
'''unitOne action ["SETTIMER", unitTwo, <bombName>]'''  
'''unitOne action ["SETTIMER", unitTwo, <bombName>]'''


Soldier 'unitOne' plays the action animation. UnitTwo activates and adds thirty seconds to the timer for a satchel charge. Neither unit needs to be near the satchel.
Soldier 'unitOne' plays the action animation. UnitTwo activates and adds thirty seconds to the timer for a satchel charge. Neither unit needs to be near the satchel.
Line 810: Line 1,070:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Causes a person to sit down on the ground (or get up, if already sitting). AI controlled units will only stay seated if they are in safe or careless behaviour mode.
|'''Description''':
| Causes a person to sit down on the ground (or get up, if already sitting). AI controlled units will only stay seated if they are in safe or careless behaviour mode.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["sitDown", ''targetUnit'']
|'''Syntax''':
| ''unit'' action ["sitDown", ''targetUnit'']
|-valign=top
|-valign=top
|                           ||Where ''unit'' is any unit (no animation is performed), and ''targetUnit'' is the person who is to sit down.
|
| Where ''unit'' is any unit (no animation is performed), and ''targetUnit'' is the person who is to sit down.
|-valign=top
|-valign=top
|'''Example''':             ||soldierOne action ["sitDown", soldierOne]
| '''Example''':
| <sqf>soldierOne action ["sitDown", soldierOne]</sqf>
|}
|}


Line 822: Line 1,086:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Does nothing. There is no punch animation in ArmA, however this action (presumably) remains in the engine from the days of Operation Flashpoint.
|'''Description''':
| Does nothing. There is no punch animation in ArmA, however this action (presumably) remains in the engine from the days of Operation Flashpoint.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["strokeFist", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["strokeFist", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Syntax unknown.
|
| Syntax unknown.
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 835: Line 1,103:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Does nothing (other than making a person twitch a little). There is no suitable animation for this action in ArmA, however this action (presumably) remains in the engine from the days of Operation Flashpoint.
|'''Description''':
| Does nothing (other than making a person twitch a little). There is no suitable animation for this action in ArmA, however this action (presumably) remains in the engine from the days of Operation Flashpoint.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["strokeGun", ''targetVehicle'']
|'''Syntax''':
| ''unit'' action ["strokeGun", ''targetVehicle'']
|-valign=top
|-valign=top
|                           ||Syntax unknown.
|
| Syntax unknown.
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 848: Line 1,120:
:{|style="background:transparent"
:{|style="background:transparent"
|-valign=top
|-valign=top
|'''Description''':         ||Use and effects unknown.
|'''Description''':
| Use and effects unknown.
|-valign=top
|-valign=top
|'''Syntax''':               ||''unit'' action ["Surrender", ''<target>'']
|'''Syntax''':
| ''unit'' action ["Surrender", ''<target>'']
|-valign=top
|-valign=top
|                           ||
|
|
|-valign=top
|-valign=top
|'''Example''':             ||
|'''Example''':
|
|}
|}


Line 865: Line 1,141:
If the mode index is higher than available indices, it assumes index 0.
If the mode index is higher than available indices, it assumes index 0.


If you just want to change the muzzle used, rather than the firing mode, the standard command [http://community.bistudio.com/wiki/selectWeapon selectWeapon] is generally more useful.
If you just want to change the muzzle used, rather than the firing mode, the standard command [[selectWeapon|selectWeapon]] is generally more useful.


Example:
Example:
<code>gameLogic action ["SWITCHMAGAZINE", unit1, unit1, 3];
<sqf>
gameLogic action ["SWITCHMAGAZINE", m1a1, gunner m1a1, 1];</code>
gameLogic action ["SWITCHMAGAZINE", unit1, unit1, 3];
gameLogic action ["SWITCHMAGAZINE", m1a1, gunner m1a1, 1];
</sqf>


== SWITCHWEAPON ==
== SWITCHWEAPON ==
Line 877: Line 1,155:


Example:
Example:
<code>unit2 action ["SWITCHWEAPON",unit1,unit1,7]
<sqf>
player action ["SWITCHWEAPON", vehicle player, vehicle player, 3]</code>
unit2 action ["SWITCHWEAPON",unit1,unit1,7]
player action ["SWITCHWEAPON", vehicle player, vehicle player, 3]</sqf>


== TAKEFLAG ==
== TAKEFLAG ==
Line 886: Line 1,165:


Example:
Example:
<code>SoldierOne action ["TAKEFLAG", FlagOne]</code>
<sqf>SoldierOne action ["TAKEFLAG", FlagOne]</sqf>




Line 893: Line 1,172:
'''unitname action ["TAKEWEAPON", (vehiclename or unitname), "WEAPONNAME"]'''
'''unitname action ["TAKEWEAPON", (vehiclename or unitname), "WEAPONNAME"]'''


Soldier 'unitname' takes one magazine/weapon of specified type ([[:Category: Weapons|see list]]) from the ground (Weaponholder) or from named vehicle (ammo box, car, etc.).<br>
Soldier 'unitname' takes one magazine/weapon of specified type ([[:Category: Weapons|see list]]) from the ground (Weaponholder) or from named vehicle (ammo box, car, etc.).<br>
Transfer happens immediately and via teleportation. Unit1 plays pickup animation at its current position, no matter where 'weapon or magazine' is.
Transfer happens immediately and via teleportation. Unit1 plays pickup animation at its current position, no matter where 'weapon or magazine' is.


Example:
Example:
<code>SoldierOne action ["TAKEMAGAZINE", SoldierTwo, "RPGLAUNCHER"]</code>
<sqf>SoldierOne action ["TAKEMAGAZINE", SoldierTwo, "RPGLAUNCHER"]</sqf>




Line 906: Line 1,185:


Example:
Example:
<code>unit1 action ["takeMine",unit2]</code>
<sqf>unit1 action ["takeMine",unit2]</sqf>




Line 920: Line 1,199:


Example:
Example:
<code>player action ["TEAMSWITCH", player]</code>
<sqf>player action ["TEAMSWITCH", player]</sqf>




Line 929: Line 1,208:


Example:
Example:
<code>unitname action ["TOUCHOFF", unitname]</code>
<sqf>unitname action ["TOUCHOFF", unitname]</sqf>




Line 939: Line 1,218:


Examples:
Examples:
<code>TankOne action ["TURNIN", TankOne]
<sqf>
player action ["TURNOUT,vehicle player]</code>
TankOne action ["TURNIN", TankOne]
player action ["TURNOUT", vehicle player]
</sqf>




Line 946: Line 1,227:
'''["USEMAGAZINE", <target>, <magazine creator>, <number>, <number>]'''
'''["USEMAGAZINE", <target>, <magazine creator>, <number>, <number>]'''


This makes the target bend down, like he's using an ammo crate. I don't notice anything else happening. I don't know what the number values at the end do.
This makes the target bend down, like he's using an ammo crate. I don't notice anything else happening. I don't know what the number values at the end do.


Example:
Example:
<code>player action["USEMAGAZINE", player, player, 0, 0]</code>
<sqf>player action["USEMAGAZINE", player, player, 0, 0]</sqf>


== USER ==
== USER ==
Line 957: Line 1,238:


Example:
Example:
<code>gameLogic action ["USER", player, 3]</code>
<sqf>gameLogic action ["USER", player, 3]</sqf>




Line 963: Line 1,244:
'''["USERTYPE", <target>, <action index>]'''
'''["USERTYPE", <target>, <action index>]'''


As of ArmA version 1.08, using this action type will cause ArmA to crash to desktop.
As of ArmA version 1.08, using this action type will cause ArmA to crash to desktop (fixed in OA v1.60).
 


== USEWEAPON ==
== USEWEAPON ==
Line 972: Line 1,252:


Examples:
Examples:
<code>gameLogic action ["useWeapon",unit1,unit1,16]
<sqf>gameLogic action ["useWeapon",unit1,unit1,16]
gameLogic action ["useWeapon",vehicle unit1,unit1,0]
gameLogic action ["useWeapon",vehicle unit1,unit1,0]
gameLogic action ["useWeapon",myTank,gunner myTank,1]
gameLogic action ["useWeapon",myTank,gunner myTank,1]
gameLogic action ["useWeapon",myTank,commander myTank,0]</code>
gameLogic action ["useWeapon",myTank,commander myTank,0]</sqf>




Line 982: Line 1,262:
'''unitName action ["WEAPONONBACK",<target unit>]'''
'''unitName action ["WEAPONONBACK",<target unit>]'''


Soldier 'unitName' does nothing, 'target unit' moves his weapon from/to the safety position (gun held across chest pointing at the ground).  
Soldier 'unitName' does nothing, 'target unit' moves his weapon from/to the safety position (gun held across chest pointing at the ground).
Change is persistent with player, but AI units will change back to suit their current [[setBehaviour|behaviour mode]]. AI generally keep their rifles safe unless moving or targeting.<br>
Change is persistent with player, but AI units will change back to suit their current [[setBehaviour|behaviour mode]]. AI generally keep their rifles safe unless moving or targeting.<br>
(''VBS2 calls this action "PUTWEAPONONBACK"'')
(''VBS2 calls this action "PUTWEAPONONBACK"'')


Example:
Example:
<code>SoldierOne action ["WEAPONONBACK", SoldierTwo]</code>
<sqf>SoldierOne action ["WEAPONONBACK", SoldierTwo]</sqf>


= Unsorted actions found in UI.pbo/config.bin =
= Unsorted actions found in UI.pbo/config.bin =
Line 996: Line 1,276:
is synonym for DropWeapon (same syntax)?
is synonym for DropWeapon (same syntax)?


==PutMagazine==
== PutMagazine ==
is synonym for DropMagazine (same syntax)?
is synonym for DropMagazine (same syntax)?


==StartTimer==
== StartTimer ==
is synonym for SetTimer (same syntax) ?
is synonym for SetTimer (same syntax) ?


==HideWeapon==
== HideWeapon ==
unit action ["hideWeapon",<object>,<object>,<Number>]
unit action ["hideWeapon",<object>,<object>,<Number>]


==MarkWeapon==
== MarkWeapon ==
== HandGunOffStand==
== HandGunOffStand==
== HandGunOnStand==
== HandGunOnStand==
==TakeDropMagazine/TakeDropWeapon==
== TakeDropMagazine/TakeDropWeapon ==


<!-- Here's the list with the correct syntaxes... everyone is called to update the stuff above!
<!-- Here's the list with the correct syntaxes... everyone is called to update the stuff above!


["None", <target>]  
["None", <target>]
["GetInCommander", <target>]  
["GetInCommander", <target>]
["GetInDriver", <target>]  
["GetInDriver", <target>]
["GetInGunner", <target>]  
["GetInGunner", <target>]
["GetInCargo", <target>]  
["GetInCargo", <target>]
["Heal", <target>]  
["Heal", <target>]
["Repair", <target>]  
["Repair", <target>]
["Refuel", <target>]  
["Refuel", <target>]
["Rearm", <target>]  
["Rearm", <target>]
["GetOut", <target>]  
["GetOut", <target>]
["LightOn", <target>]  
["LightOn", <target>]
["LightOff", <target>]  
["LightOff", <target>]
["EngineOn", <target>]  
["EngineOn", <target>]
["EngineOff", <target>]  
["EngineOff", <target>]
["SwitchWeapon", <target>, <weapon index>]  
["SwitchWeapon", <target>, <weapon index>]
["UseWeapon", <target>, <weapon index>]  
["UseWeapon", <target>, <weapon index>]
["LoadMagazine", <target>, <magazine creator>, <magazine id>, <weapon name>, <muzzle
["LoadMagazine", <target>, <magazine creator>, <magazine id>, <weapon name>, <muzzle
name>]  
name>]
["TakeWeapon", <target>, <weapon name>]  
["TakeWeapon", <target>, <weapon name>]
["TakeMagazine", <target>, <magazine type name>]  
["TakeMagazine", <target>, <magazine type name>]
["TakeFlag", <target>]  
["TakeFlag", <target>]
["ReturnFlag", <target>]  
["ReturnFlag", <target>]
["TurnIn", <target>]  
["TurnIn", <target>]
["TurnOut", <target>]  
["TurnOut", <target>]
["WeaponInHand", <target>, <weapon name>]  
["WeaponInHand", <target>, <weapon name>]
["WeaponOnBack", <target>, <weapon name>]  
["WeaponOnBack", <target>, <weapon name>]
["SitDown", <target>]  
["SitDown", <target>]
["Land", <target>]  
["Land", <target>]
["CancelLand", <target>]  
["CancelLand", <target>]
["Eject", <target>]  
["Eject", <target>]
["MoveToDriver", <target>]  
["MoveToDriver", <target>]
["MoveToGunner", <target>]  
["MoveToGunner", <target>]
["MoveToCommander", <target>]  
["MoveToCommander", <target>]
["MoveToCargo", <target>]  
["MoveToCargo", <target>]
["HideBody", <target>]  
["HideBody", <target>]
["TouchOff", <target>]  
["TouchOff", <target>]
["SetTimer", <target>]  
["SetTimer", <target>]
["Deactivate", <target>]  
["Deactivate", <target>]
["NVGoggles", <target>]  
["NVGoggles", <target>]
["ManualFire", <target>]  
["ManualFire", <target>]
["AutoHover", <target>]  
["AutoHover", <target>]
["StrokeFist", <target>]  
["StrokeFist", <target>]
["StrokeGun", <target>]  
["StrokeGun", <target>]
["LadderUp", <target>, <ladder index>, <ladder position>]  
["LadderUp", <target>, <ladder index>, <ladder position>]
["LadderDown", <target>, <ladder index>, <ladder position>]  
["LadderDown", <target>, <ladder index>, <ladder position>]
["LadderOnDown", <target>, <ladder index>, <ladder position>]  
["LadderOnDown", <target>, <ladder index>, <ladder position>]
["LadderOnUp", <target>, <ladder index>, <ladder position>]  
["LadderOnUp", <target>, <ladder index>, <ladder position>]
["LadderOff", <target>, <ladder index>]  
["LadderOff", <target>, <ladder index>]
["FireInflame", <target>]  
["FireInflame", <target>]
["FirePutDown", <target>]  
["FirePutDown", <target>]
["LandGear", <target>]  
["LandGear", <target>]
["FlapsDown", <target>]  
["FlapsDown", <target>]
["FlapsUp", <target>]  
["FlapsUp", <target>]
["Salute", <target>]  
["Salute", <target>]
["ScudLaunch", <target>]  
["ScudLaunch", <target>]
["ScudStart", <target>]  
["ScudStart", <target>]
["ScudCancel", <target>]  
["ScudCancel", <target>]
["User", <target>, <action index>]  
["User", <target>, <action index>]
["DropWeapon", <target>, <weapon name>]  
["DropWeapon", <target>, <weapon name>]
["DropMagazine", <target>, <magazine type name>]  
["DropMagazine", <target>, <magazine type name>]
["UserType", <target>, <action index>]  
["UserType", <target>, <action index>]
["HandGunOn", <target>, <weapon name>]  
["HandGunOn", <target>, <weapon name>]
["HandGunOff", <target>, <weapon name>]  
["HandGunOff", <target>, <weapon name>]
["TakeMine", <target>]  
["TakeMine", <target>]
["DeactivateMine", <target>]  
["DeactivateMine", <target>]
["UseMagazine", <target>, <magazine creator>, <magazine id>]  
["UseMagazine", <target>, <magazine creator>, <magazine id>]
["IngameMenu", <target>]  
["IngameMenu", <target>]
["CancelTakeFlag", <target>]  
["CancelTakeFlag", <target>]
["CancelAction", <target>]  
["CancelAction", <target>]
["MarkEntity", <target>]  
["MarkEntity", <target>]
["Talk", <target>]  
["Talk", <target>]
["Diary", <target>]
["Diary", <target>]


-->
-->


[[Category: Actions]]
 
[[Category: Scripting Topics]]
[[Category:Actions]]

Latest revision as of 15:02, 29 July 2022

Actions are events that are usually executed in-game by the player by using the action menu, or by using the action sub-menu of the command menu when executing them upon AI in the the player's group. Actions can also be performed by and upon arbitrary units using the action script command. Executing an action in this way will generally create only the basic effect of that seen when starting actions using the action menu, so it may be necessary to script additional effects to achieve the same effect as the game's default action menu, and to maintain immersion. For example, scripted use of the "deactivate" action will not check the distance between the satchel and the collecting unit, allowing it to be used to pick up a satchel that is many kilometers away. Many actions can be executed by a different unit than the target unit, although in most cases it makes more sense to use the same unit. The unit executing the action will generally bend down as if to pick something up (the action animation), with the action effects taking place when the animation completes. It is possible to use a game logic unit to execute actions without any animation or delay.

General Syntax

unit action ["actionType", parameter(s)]

unit: Object. Can be any occupied vehicle or person that is not in a vehicle.
"actionType": String. Not case sensitive.
parameter(s): Various data types, dependant on the action used. The number of required parameters depends on the action type.


Actions

AutoHover

Description: Toggles auto-hovering on and off. Note that while the auto-hover status can be toggled on an AI crewed or even an empty vehicle, it will only affect a vehicle controlled by a human pilot.
Syntax: unit action ["autoHover", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is any vehicle that is capable of hovering.
Example:
chopperOne action ["autoHover", chopperOne]


CancelAction

Description: Cancels an action in progress. The target unit will complete it is current animation, although the action itself will not be performed.
Syntax: unit action ["cancelAction", targetUnit]
Where unit is any unit (no action animation is performed) and targetUnit is any unit that is in the process of performing an action.
Example:
soldierOne action ["CANCELACTION", soldierOne]


CancelLand

Description: Cancels autopilot landing for an aircraft, including AI controlled aircraft.
Syntax: unit action ["cancelLand", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is any vehicle that is currently performing an autopilot landing.
Example:
planeOne action ["cancelLand", planeOne]


CancelTakeFlag

Description: Cancels taking of a flag. The unit will complete the taking/action animation, but the flag will remain attached to it is current object. This action needs to be executed while the flag is being taken (which happens after the unit completes the taking/action animation) to prevent a unit taking the flag. For example, if a person is taking a flag from a flagpole, then the cancelTakeFlag action should be executed while the flag is descending the flagpole.
Syntax: unit action ["cancelTakeFlag", targetFlag]
Where unit is any unit that is currently taking a flag (no action animation is performed) and targetFlag' is a flag object.
Example:
westSoldierOne action ["cancelTakeFlag", eastFlag]


Deactivate

Description: Causes a unit to deactivate and take a active satchel charge placed by any unit. This action can be performed upon a satchel object from any distance.
Syntax: unit action ["deactivate", targetUnit, targetObject]
Where unit is any unit (they will perform the action animation as if deactivating a satchel charge). targetUnit will have the deactivated satchel charge added to it is inventory. targetObject is the armed satchel object to be deactivated (class "pipeBomb" or "timeBomb").
Examples:
soldierOne action ["deactivate", soldierOne, mySatchelCharge] soldierOne action ["deactivate", soldierOne, nearestObject [soldierOne, "pipeBomb"]]


DeactivateMine

Description: Causes a unit to deactivate any armed landmine that is within about two meters of a unit. Neither unit requires the ability to disable landmines.
Syntax: unit action ["deactivateMine", targetUnit]
Where unit is any unit, who will perform the action animation. The closest landmine to targetUnit will be deactivated.
Example:
soldierOne action ["deactivateMine", soldierOne]


Diary

Description: Use and effects unknown.
Syntax: unit action ["diary", <target>]
Example:


DropMagazine

Description: Causes a person to drop a magazine either into another unit (both persons and vehicles), or onto the ground (creating a new WeaponHolder object). Magazines can be dropped into other units at any distance.
Syntax: unit action ["dropMagazine", targetUnit, "magazineName"]
Where unit is the person to drop a magazine (the action animation will be performed), targetUnit is either another unit into which the magazine will be dropped, or the same unit that is dropping the magazine. "magazineName" is the classname (string) of the magazine to be dropped (see the ArmA weapons list for magazine classnames).
Examples:
soldierOne action ["dropMagazine", soldierOne, "30Rnd_545x39_AK"] soldierOne action ["dropMagazine", ammoCrateOne, "30Rnd_545x39_AK"]


DropWeapon

Description: Causes a person to drop a weapon and all associated magazines either into another unit (including persons and vehicles), or onto the ground (creating a new WeaponHolder object). Weapons can be dropped into other units at any distance.
Syntax: unit action ["dropWeapon", targetUnit, "weaponName"]
Where unit is the person to drop a weapon (the action animation will be performed), targetUnit is either another unit into which the weapon will be dropped, or the same unit that is dropping the weapon to place it onto the ground. "weaponName" is the classname (string) of the weapon to be dropped (see the ArmA weapons list for classnames).
Examples:
soldierOne action ["dropWeapon", soldierOne, "AK74GL"] soldierOne action ["dropWeapon", ammoCrateOne, "RPG7V"]


Eject

Description: Causes a person to eject out of the vehicle they are currently inside. If the unit was the driver of the vehicle, the vehicle will retain it is steering control input and it is engine will remain on. This action has a global effect when used on a local unit in multiplayer. If the vehicle parameter used is an moving aircraft, the ejecting person will use a parachute (and likewise if it is not an moving aircraft, no parachute will be used).
Syntax: unit action ["eject", vehicle]
Where unit is the person to eject from their current vehicle, and vehicle is any vehicle (generally the vehicle unit is within).
Example:
soldierOne action ["EJECT", vehicle soldierOne]


EngineOn

Description: Turns a vehicle's engine on. This command will not override an AI driver's desires.
Syntax: unit action ["engineOn", targetVehicle]
Where unit is any unit, and targetVehicle is the vehicle to start it is engine.
Example:
soldierOne action ["engineOn", vehicle soldierOne]


EngineOff

Description: Turns a vehicle's engine off. This command will not override an AI driver's desires.
Syntax: unit action ["engineOff", targetVehicle]
Where unit is any unit, and targetVehicle is the vehicle to have it is engine turned off.
Example:
soldierOne action ["engineOff", vehicle soldierOne]


FireInFlame

Description: Ignites a fireplace object (from any distance).
Syntax: unit action ["fireInFlame", targetObject]
Where unit is any unit(the action animation will be performed), and targetObject is the fireplace to be ignited.
Example:
soldierOne action ["fireInFlame", firePlaceOne]


FirePutDown

Description: Extinguishes a fireplace object (from any distance).
Syntax: unit action ["firePutDown", targetObject]
Where unit is any unit (the action animation will be performed), and targetObject is the fireplace to be extinguished.
Example:
soldierOne action ["firePutDown", firePlaceOne]


FlapsUp

Description: Adjusts an aircraft's flaps upwards one notch. AI pilot's will instantly adjust their flaps to whatever setting they feel is suitable.
Syntax: unit action ["flapsUp", targetVehicle]
Where unit is any unit (the action animation will not be performed), and targetVehicle is the aircraft to have it is flaps adjusted.
Example:
harrierOne action ["flapsUp", harrierOne]


FlapsDown

Description: Adjusts an aircraft's flaps down one notch. AI pilot's will instantly adjust their flaps to whatever setting they feel is suitable.
Syntax: unit action ["flapsDown", targetVehicle]
Where unit is any unit (the action animation will not be performed), and targetVehicle is the aircraft to have it is flaps adjusted.
Example:
harrierOne action ["flapsDown", harrierOne]

Gear

unitName action ["GEAR",<target unit>]

UnitName opens the gear of <target unit> (but only if he is within normal range) and plays the "pick up" animation, allowing transfer of gear between the two units. This works even if <target unit> does not normally have a gear action (for instance between two soldiers). Using "" or ObjNull for <target unit> will drop the gear on the ground, but it will take a little while before the game recognizes the weapon holder.

Example:

SoldierOne action ["GEAR", SoldierTwo]

GetInCargo

Description: Instantly moves a person to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as cargo, in a specific cargo position if given as an optional parameter, otherwise in the first available cargo position. If the specific position is already occupied, the person will board in the first available cargo position. If the all cargo positions are already occupied by living persons, or no cargo position exists, the boarding will fail.
Syntax: unit action ["getInCargo", targetVehicle]
unit action ["getInCargo", targetVehicle, positionNumber]
Where unit is the person to board, and targetVehicle is the vehicle to be boarded. positionNumber is a specific cargo position index number.
Examples:
soldierOne action ["getInCargo", truckOne] soldierOne action ["getInCargo", truckOne, 0]


GetInCommander

Description: Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, they then attempt to board the vehicle as the commander. The boarding will fail if the position is already occupied or does not exist.
Syntax: unit action ["getInCommmander", targetVehicle]
Where unit is the person to board, and targetVehicle is the vehicle to be boarded.
Example:
soldierOne action ["getInCommmander", tankOne]


GetInDriver

Description: Instantly moves an person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the driver/pilot. The boarding will fail if the position is already occupied or does not exist.
Syntax: unit action ["getInDriver", targetVehicle]
Where unit is the person to board, and targetVehicle is the vehicle to be boarded.
Example:
soldierOne action ["getInDriver", carOne]


GetInGunner

Description: Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the primary gunner. If the gunner position is already occupied by another living person or it does not exist, the boarding will fail. Also see getInTurret.
Syntax: unit action ["getInGunner", targetVehicle]
Where unit is the person to board, and targetVehicle is the vehicle to be boarded.
Example:
soldierOne action ["getInGunner", mySpotlight]


GetInPilot

Description: This action is identical to getInDriver. It instantly moves an person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the driver/pilot. The boarding will fail if the position is already occupied or does not exist.
Syntax: unit action ["getInPilot", targetVehicle]
Where unit is the person to board, and targetVehicle is the vehicle to be boarded.
Example:
pilotOne action ["getInPilot", chopperOne]


GetInTurret

Description: Instantly moves a person (who is not already in a vehicle) to the appropriate boarding position of a vehicle, then they attempt to board the vehicle as the specified turret user. If the turret position is already occupied by another living person the boarding will fail. If the turret position does not exist, ArmA may crash (no longer true for Arma 2 / OA). See also getInGunner.
Syntax: unit action ["getInTurret", targetVehicle, turretArray]
Where unit is the person to board, and targetVehicle is the vehicle to be boarded, and turretArray is an array defining the turret. For example, [1] would be a vehicle's second turret, and [0, 2, 1] is the second turret of the third turret of the first turret. A vehicle's turret order is defined in it is class CfgVehicles of the Config.
Examples:
gunnerTwo action ["getInTurret", myUH60MG, [1]] tankCommanderOne action ["getInTurret", myT72, [0,1]]

GetOut

Description: Causes a person to disembark from a vehicle, without a parachute in the case of aircraft. See also eject.
Syntax: unit action ["getOut", targetVehicle]
Where unit is the person to disembark, and targetVehicle is the vehicle to disembark from.
Example:
soldierOne action ["getOut", carOne]


HandGunOn

Description: Causes a person to ready their hand gun (if equiped). This action may not work if the unit does not have a primary rifle.
Syntax: unit action ["handGunOn", targetUnit]
Where unit is any unit (who will not play the action animation), and targetUnit is the unit who will ready their pistol.
Example:
soldierOne action ["handGunOn", soldierOne]


HandGunOff

Description: Causes a person to return a readied pistol to it is holster, then switch to the primary rifle. This action may not work if the unit does not have a primary rifle.
Syntax: unit action ["handGunOff", targetUnit]
Where unit is any unit (who will not play the action animation), and targetUnit is the person to holster it is pistol.
Example:
soldierOne action ["handGunOff", soldierOne]


Heal

Description: Instantly teleports a person unit to the target medic. The target medic then heals the unit. If the target unit is not a medic, the animations will still be played, but no healing occurs. If the medic is within a vehicle, no teleporting will occur and the wounded unit will only be healed if they are already within healing range (a few meters).
Syntax: unit action ["heal", targetUnit]
Where unit is a wounded person, and targetUnit is the medic to do the healing.
Example:
soldierOne action ["heal", medicOne]


HideBody

Description: Causes a person to bend down and hide (bury) a body in the ground. The body is automatically deleted within a few seconds. The person performing the action does not require the ability to hide bodies, and may be any distance from the body.
Syntax: unit action ["hideBody", targetUnit]
Where unit is a person, and targetUnit is a dead person.
Example:
soldierOne action ["hideBody", soldierTwo]


InGameMenu

Description: Use and effects unknown.
Syntax: unit action ["inGameMenu", <target>]
Example:


LadderDown

Description: Causes a person to play an animation as if mounting the top of a ladder, then instantly teleport onto the specified ladder in the specified position. If the person is controlled by AI, they will automatically climb up or down the ladder. If the 2 parameter syntax is used, the person will become stuck in the ladder mounting animation state until the ladderOff action is executed upon them. It may also crash ArmA (pre 1.09).
Syntax: unit action ["ladderDown", targetObject]
unit action ["ladderDown", targetObject, ladderNumber, positionNumber]
Where unit is any person unit, targetObject is an object with a ladder, ladderNumber is a number defining the desired ladder, and positionNumber is a number defining the desired position.
Example:
soldierOne action ["ladderDown", (position soldierOne nearestObject 452221), 0, 1]


LadderUp

Description: Causes a person to play an animation as if mounting the bottom of a ladder, then instantly teleport onto the specified ladder in the specified position. If the person is controlled by AI, they will automatically climb up or down the ladder. If the 2 parameter syntax is used, the person will become stuck in the ladder mounting animation state until the ladderOff action is executed upon them. It may also crash ArmA (pre 1.09).
Syntax: unit action ["ladderUp", targetObject]
unit action ["ladderUp", targetObject, ladderNumber, positionNumber]
Where unit is any person unit, targetObject is an object with a ladder, ladderNumber is a number defining the desired ladder, and positionNumber is a number defining the desired position.
Example:
soldierOne action ["ladderUp", (position soldierOne nearestObject 452221), 0, 0]


LadderOff

Description: Causes a person to dismount from any ladder of the specified object they may be happen to be on. The alternative 3 parameter syntax expects a number, the use of which is not known.
Syntax: unit action ["ladderOff", targetObject]
unit action ["ladderDown", targetObject, unknownNumber]
Where unit is any person unit, targetObject is the object with a ladder that the person is currently upon, unknownNumber is a number.
Example:
soldierOne action ["ladderOff", (position soldierOne nearestObject 452221)]


LadderOnDown

Description: This action appears to be identical to LadderDown.


LadderOnUp

Description: This action appears to be identical to LadderUp.


Land

Description: Turns on autopilot landing for an aircraft, including AI controlled aircraft. The aircraft will land at the closest airfield.
Syntax: unit action ["Land", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is a vehicle that can perform an autopilot landing.
Example:
planeOne action ["Land", planeOne]


LandGear

Description: Lowers the landing gear of an aircraft. Only works on player controlled aircraft.
Syntax: unit action ["LandGear", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is a vehicle that can perform an autopilot landing.
Example:
planeOne action ["LandGear", planeOne]


LandGearUp

Description: Raises the landing gear of an aircraft. Only works on player controlled aircraft.
Syntax: unit action ["LandGearUp", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is a vehicle that can perform an autopilot landing.
Example:
planeOne action ["LandGearUp", planeOne]


LightOff

Description: Turns off the headlights of an empty vehicle. If the vehicle is AI-controlled (either as the lone driver, or as the commander/gunner) then the light status depends on the AI's behaviour mode ("combat" or "stealth" = lights off, any other mode = lights on).
Syntax: unit action ["lightOff", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is a vehicle with lights.
Example:
player action ["lightOff", vehicle player]


LightOn

Description: Turns on the headlights of an empty vehicle. If vehicle is AI-controlled, see notes under the LightOff action.
Syntax: unit action ["lightOn", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is a vehicle with lights.
Example:
player action ["lightOn", spotLight]


LoadMagazine

Description: Plays a reload weapon animation.
Syntax: unit action ["loadMagazine", <target>, <magazine creator>, <number>, <number> ,<weapon name>, <muzzle name>]
# <target>: Unit to perform the reload action.
# <magazine creator>: Unknown. Can be objNull.
# <number>: Unknown. It seems it must be 0 to work.
# <number>: Unknown. With 0, it only plays the reload animation. With values from 1 up, it actually reloads the magazine. If the number becomes too high (meaning of the upper limit is also unknown), the action will no longer be performed.
# <weapon name>: Weapon to reload. Must not be selected, but may cause weapon not to reload to the full amount.
# <muzzle name>: Weapon's muzzle to reload.
Expects a 7 element array. ArmA crashes when given incompatible syntax or data with this action, making it hard to test (fixed in OA v1.60).
Example:
player action ["loadmagazine",player, player, 0, 1 ,"vbs2_us_m16a2_iron_gla", "vbs2_us_m16a2_iron_gla"]

ManualFire

Description: Enables manual fire mode for a player unit that is driver or commander of a vehicle. This action toggled manual fire mode in old versions of ArmA.
Syntax: unit action ["manualFire", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is the vehicle in which manual fire mode is to be enabled.
Example:
player action ["MANUALFIRE", vehicle player]


ManualFireCancel

Description: Disables manual fire mode for a player unit that is driver or commander of a vehicle.
Syntax: unit action ["manualFireCancel", targetVehicle]
Where unit is any unit (no action animation is performed) and targetVehicle is the vehicle in which manual fire mode is to be disabled.
Example:
player action ["manualFireCancel", vehicle player]


MarkEntity

Description: Use and effects unknown.
Syntax: unit action ["markEntity", <target>]
Example:


MoveToCargo

Description: Move a unit to the chosen cargo position within a vehicle. If another unit is already in that position, the units will swap positions. (possibly alternate syntax to place unit in first empty cargo position?)
Syntax: unit action ["moveToCargo", targetVehicle, cargoPosition]
Where unit is a unit within targetVehicle, and cargoPosition is the number of the desired cargo position (0 being the first).
Example:
player action ["moveToCargo", vehicle player, 2]


MoveToCommander

Description: Move a unit to the commander's position within a vehicle. If another unit is already in that position, the units will swap positions.
Syntax: unit action ["moveToCommander", targetVehicle]
Where unit is a unit within targetVehicle.
Example:
player action ["moveToCommander", vehicle player]


MoveToDriver

Description: Move a unit to the driver's position within a vehicle. If another unit is already in that position, the units will generally swap positions, although in some scenarios this action may not work (although having the existing driver move always works).
Syntax: unit action ["moveToDriver", targetVehicle]
Where unit is a unit within targetVehicle.
Example:
player action ["moveToDriver", vehicle player]


MoveToGunner

Description: Move a unit to the primary gunner's position within a vehicle. If another unit is already in that position, the units will swap positions. See also moveToTurret.
Syntax: unit action ["moveToGunner", targetVehicle]
Where unit is a unit within targetVehicle.
Example:
player action ["moveToGunner", vehicle player]


MoveToPilot

Description: Identical to moveToDriver.


MoveToTurret

Description: Move a unit to the chosen turret position within a vehicle. If another unit is already in that position, the units will swap positions.
Syntax: unit action ["moveToTurret", targetVehicle, turretArray]
Where unit is a unit within targetVehicle, and turret Array is an array referring to the desired turret (for example, [0,1,2] refers to the third turret of the second turret of the first turret of the vehicle).
Examples:
player action ["moveToTurret", vehicle player, [0]] player action ["moveToTurret", vehicle player, [0,1]]


None

Description: Use and effects unknown.
Syntax: unit action ["none", <target>]
Example:


NVGoggles

Description: Causes a unit to put on it is night vision goggles. AI controlled units will automatically put on and take off goggles depending on daylight.
Syntax: unit action ["nvGoggles", <anything>]
Where unit is the unit to put on NVGoggles, and <anything> can be anything (it seems to not be used at all, but the action parameter array must contain at least two elements).
Example:
player action ["nvGoggles", player]


NVGogglesOff

Description: Causes a unit to take off it is night vision goggles. AI controlled units will automatically put on and take off goggles depending on daylight.
Syntax: unit action ["nvGogglesOff", <anything>]
Where unit is the unit to put on goggles, and <anything> can be anything (it seems not to be used at all, but the action parameter array must contain at least two elements).
Example:
player action ["nvGogglesOff", player]


Rearm

Description: Causes an occupied vehicle or person to rearm from any object with some ammoCargo (generally an ammo truck) in the case of vehicles, or some magazines in it is cargo in the case of a rearming person. The rearming vehicle/person can be any distance from the rearming object. Rearming vehicles takes some time and will be interrupted if the vehicle starts to move. A rearming person will bend down as if picking up something.
Syntax: unit action ["rearm", reamingObject]
Where unit is the occupied vehicle or person to be rearmed, and rearmingObject is the object from which to rearm.
Examples:
tankOne action ["rearm", ammoTruckOne] soldierOne action ["rearm", ammoTruckOne]


Refuel

Description: Causes an occupied vehicle to refuel from any object with some fuelCargo (generally an refueling truck). The refueling object can be any distance from the vehicle. Refueling takes some time and will be interrupted if the vehicle starts to move.
Syntax: vehicle action ["refuel", refuelingObject]
Where vehicle is the occupied vehicle to be refueled, and refuelingObject is the object from which to refuel.
Example:
tankOne action ["refuel", refuelTruckOne]


Repair

Description: Causes an occupied vehicle to repair from any object with some repairCargo (generally an repair truck). The repair object can be any distance from the vehicle. Repairing takes some time and will be interrupted if the vehicle starts to move.
Syntax: vehicle action ["repair", repairingObject]
Where vehicle is the occupied vehicle to be repaired, and repairingObject is the object from which to repair.
Example:
tankOne action ["refuel", repairTruckOne]


ReturnFlag

Description: Causes a person to return a flag from a nearby dead person back to it is flagpole. As of ArmA v1.12 this action is bugged and can not be used upon flags attached to destroyed vehicles.
Syntax: unit action ["returnFlag", targetObject]
Where unit is any person, and targetObject is the dead person with a flag to be returned.
Example:
soldierOne action ["returnFlag", westFlag]


Salute

Description: Causes a person to salute. AI controlled units will only make a momentary salute, unless the AI is in safe or careless behaviour mode.
Syntax: unit action ["salute", targetUnit]
Where unit is any unit (no animation is performed), and targetUnit is the person to make the salute.
Example:
soldierOne action ["salute", soldierOne]


ScudCancel

Description: There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.
Syntax: unit action ["scudCancel", targetVehicle]
Syntax unknown.
Example:


ScudLaunch

Description: There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.
Syntax: unit action ["scudLaunch", targetVehicle]
Syntax unknown.
Example:

ScudStart

Description: There is no Scud Launcher in ArmA, however this action (probably) remains in the engine from the days of Operation Flashpoint.
Syntax: unit action ["scudStart", targetVehicle]
Syntax unknown.
Example:


SETTIMER

unitOne action ["SETTIMER", unitTwo, <bombName>]

Soldier 'unitOne' plays the action animation. UnitTwo activates and adds thirty seconds to the timer for a satchel charge. Neither unit needs to be near the satchel. Charge has to be places first using unitname Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"] command.


SitDown

Description: Causes a person to sit down on the ground (or get up, if already sitting). AI controlled units will only stay seated if they are in safe or careless behaviour mode.
Syntax: unit action ["sitDown", targetUnit]
Where unit is any unit (no animation is performed), and targetUnit is the person who is to sit down.
Example:
soldierOne action ["sitDown", soldierOne]

StrokeFist

Description: Does nothing. There is no punch animation in ArmA, however this action (presumably) remains in the engine from the days of Operation Flashpoint.
Syntax: unit action ["strokeFist", targetVehicle]
Syntax unknown.
Example:


StrokeGun

Description: Does nothing (other than making a person twitch a little). There is no suitable animation for this action in ArmA, however this action (presumably) remains in the engine from the days of Operation Flashpoint.
Syntax: unit action ["strokeGun", targetVehicle]
Syntax unknown.
Example:


Surrender

Description: Use and effects unknown.
Syntax: unit action ["Surrender", <target>]
Example:


SWITCHMAGAZINE

<unit> action ["SWITCHMAGAZINE", <target vehicle>, <target unit>, <mode index>]

Target unit switches to the given firing mode index. This allows selection of any firing mode for any weapon carried by a soldier, or mounted on a weapon. First are the firing modes for the primary weapon (index 0 upwards), then secondary weapon, then optics, then pistol, then thrown and placed weapons. Changing to NVGoggles just plays an animation, not actually setting NV mode. Unfortunately, the list of firing modes seems to only be created when a soldier is initiated; modes are removed from the list when a weapon is dropped and not re-added when a weapon is picked up. Thus, only use this during the initiation phase of the soldier. On vehicles, where the weapons are not likely to be changed, this action might be useful after the vehicle has been initiated.

If the mode index is higher than available indices, it assumes index 0.

If you just want to change the muzzle used, rather than the firing mode, the standard command selectWeapon is generally more useful.

Example:

gameLogic action ["SWITCHMAGAZINE", unit1, unit1, 3]; gameLogic action ["SWITCHMAGAZINE", m1a1, gunner m1a1, 1];

SWITCHWEAPON

unitOne action ["SWITCHWEAPON", <target unit>, <target unit>, <muzzle index>]

UnitOne plays the action animation. Target unit switches to the given muzzle/mode index. Target unit can also be a vehicle. The weapons array is a list of all weapon modes specific to each weapon, muzzle and firing mode combination.

Example:

unit2 action ["SWITCHWEAPON",unit1,unit1,7] player action ["SWITCHWEAPON", vehicle player, vehicle player, 3]

TAKEFLAG

unitname action ["TAKEFLAG", flag1]

Soldier 'unitname' takes control of 'flag1'. He must be close to the flagpole and it must belong to an enemy side.

Example:

SoldierOne action ["TAKEFLAG", FlagOne]


TAKEMAGAZINE / TAKEWEAPON

unitname action ["TAKEMAGAZINE", (vehiclename or unitname), "MAGAZINENAME"]
unitname action ["TAKEWEAPON", (vehiclename or unitname), "WEAPONNAME"]

Soldier 'unitname' takes one magazine/weapon of specified type (see list) from the ground (Weaponholder) or from named vehicle (ammo box, car, etc.).
Transfer happens immediately and via teleportation. Unit1 plays pickup animation at its current position, no matter where 'weapon or magazine' is.

Example:

SoldierOne action ["TAKEMAGAZINE", SoldierTwo, "RPGLAUNCHER"]


TAKEMINE

unitName action ["TAKEMINE", <target unit>]

UnitName will perform the action animation. The closest mine that is within two meters of the target unit will be placed into the target unit's inventory.

Example:

unit1 action ["takeMine",unit2]


TALK

["TALK", <target>]


TEAMSWITCH

<current unit> action ["TEAMSWITCH ", <unit>]

Opens the normal team-switch dialog. <current unit> will be greyed out in the list and thus unselectable. The effect of the second array element is unknown, but it must be a unit. Works in single-player game only (in MP games, will just momentarily show the mouse cursor without the team-switch window being shown).

Example:

player action ["TEAMSWITCH", player]


TOUCHOFF

unitOne action ["TOUCHOFF", unitTwo]

Soldier 'unitOne' plays the action animation. UnitTwo's satchels are "touched off". UnitTwo must be within range (300m) of his satchels to touch them off.

Example:

unitname action ["TOUCHOFF", unitname]


TURNIN / TURNOUT

unitName action ["TURNIN", vehicleName]
unitName action ["TURNOUT", vehicleName]

Crew of 'vehiclename' turns in/out (gets in and out of hatches). UnitName must be a player in effective commander of vehicleName. AI will automatically turn in/out based on their current behaviour mode.

Examples:

TankOne action ["TURNIN", TankOne] player action ["TURNOUT", vehicle player]


USEMAGAZINE

["USEMAGAZINE", <target>, <magazine creator>, <number>, <number>]

This makes the target bend down, like he's using an ammo crate. I don't notice anything else happening. I don't know what the number values at the end do.

Example:

player action["USEMAGAZINE", player, player, 0, 0]

USER

unitName ["USER", <target unit>, <action index>]

Soldier 'unitName' does nothing. Executes the custom action with the given index of the the target unit. Indexes are based upon the order in which the actions are added to the unit. See addAction.

Example:

gameLogic action ["USER", player, 3]


USERTYPE

["USERTYPE", <target>, <action index>]

As of ArmA version 1.08, using this action type will cause ArmA to crash to desktop (fixed in OA v1.60).

USEWEAPON

unitOne ["USEWEAPON", <target vehicle>, <target unit>, <weapon index>]

Soldier 'unitOne' will play the action animation. Target unit will fire the specified unit's position in the target vehicle's (can be the unit itself) weapon mode index. The indexes seem to be based upon the order in which weapons are added to the unit/vehicle, with each weapon's muzzle's fire mode having an unique index. Weapons can be fired in this way from a not-readied position (eg, firing a rifle on a soldiers back). Pistols will fire from the current weapon's proxy. It can also be used to sound the horn on AI controlled vehicles.

Examples:

gameLogic action ["useWeapon",unit1,unit1,16] gameLogic action ["useWeapon",vehicle unit1,unit1,0] gameLogic action ["useWeapon",myTank,gunner myTank,1] gameLogic action ["useWeapon",myTank,commander myTank,0]


WEAPONINHAND / WEAPONONBACK

unitName action ["WEAPONINHAND",<target unit>]
unitName action ["WEAPONONBACK",<target unit>]

Soldier 'unitName' does nothing, 'target unit' moves his weapon from/to the safety position (gun held across chest pointing at the ground). Change is persistent with player, but AI units will change back to suit their current behaviour mode. AI generally keep their rifles safe unless moving or targeting.
(VBS2 calls this action "PUTWEAPONONBACK")

Example:

SoldierOne action ["WEAPONONBACK", SoldierTwo]

Unsorted actions found in UI.pbo/config.bin

LoadOtherMagazine

LoadEmptyMagazine

PutWeapon

is synonym for DropWeapon (same syntax)?

PutMagazine

is synonym for DropMagazine (same syntax)?

StartTimer

is synonym for SetTimer (same syntax) ?

HideWeapon

unit action ["hideWeapon",<object>,<object>,<Number>]

MarkWeapon

HandGunOffStand

HandGunOnStand

TakeDropMagazine/TakeDropWeapon