BIS Game Engine Scripting Commands

Page 1 of 415

!a
Operand types: a: Boolean Type of returned value: Boolean Description: not a Example: !true , result is false Category: Default

grp1 != grp2
Operand types: grp1: Group grp2: Group Type of returned value: Boolean Description: Checks whether two groups are different. If either of them is grpNull, true is returned. Example: group player != group soldierOne Category: OFP

a != b
Operand types: a: Number b: Number Type of returned value: Boolean Description: a is not equal to b Example: counter != 4 Category: Default

location1 != location2
Operand types: location1: Location

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 2 of 415

location2: Location Type of returned value: Boolean Description: Checks whether two locations are different. If either of them is null, true is returned. Category: Location

a != b
Operand types: a: String b: String Type of returned value: Boolean Description: a is not equal to b (case insensitive) Example: nameOfPlayer != "John Doe" Category: Default

text1 != text2
Operand types: text1: Structured text text2: Structured text Compatibility: Version 2.01 required. Type of returned value: Boolean Description: Checks whether two structured text values are different. Category: OFP

side1 != side2
Operand types: side1: Side side2: Side Type of returned value: Boolean Description: Checks whether two side values are different. Example:

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 3 of 415

side player != west Category: OFP

control1 != control2
Operand types: control1: Control control2: Control Compatibility: Version 2.50 required. Type of returned value: Boolean Description: Checks whether two controls are different. Category: OFP PC

task1 != task2
Operand types: task1: Task task2: Task Compatibility: Version 2.92 required. Type of returned value: Boolean Description: Checks whether two tasks are different. Category: Identity

obj1 != obj2
Operand types: obj1: Object obj2: Object Type of returned value: Boolean Description: Checks whether two objects are different. If either of them is objNull, true is returned. Example: vehicle player != player Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 4 of 415

display1 != display2
Operand types: display1: Display display2: Display Compatibility: Version 2.50 required. Type of returned value: Boolean Description: Checks whether two displays are different. Category: OFP PC

config1 != config2
Operand types: config1: Config config2: Config Compatibility: Version 2.58 required. Type of returned value: Boolean Description: Checks whether two config entries are different. Category: OFP PC

a%b
Operand types: a: Number b: Number Type of returned value: Number Description: The remainder of a divided by b. Note that the remainder is calculated in the real domain. Example: 4.5 % 3 , result is 1.5 Category: Default

a && b
Operand types: a: Boolean b: Boolean

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 5 of 415

Type of returned value: Boolean Description: a and b Example: alive player && alive leader player Category: Default

a*b
Operand types: a: Number b: Number Type of returned value: Number Description: a multiplied by b Example: iCounter*3 Category: Default

+a
Operand types: a: Number Type of returned value: Number Description: unary plus: returns a Example: +4 , result is 4 Category: Default

+a
Operand types: a: Array Type of returned value: Array Description: unary plus: returns a copy of the array

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 6 of 415

Example: + [0, 1, 2] , result is [0, 1, 2] Category: Default

a+b
Operand types: a: Number b: Number Type of returned value: Number Description: a plus b Example: counter + 1 Category: Default

arrayA + arrayB
Operand types: arrayA: Array arrayB: Array Type of returned value: Array Description: arrayA and arrayB are concatenated. Example: [0, 1, 2] + [1, 2, 3] , result is [0, 1, 2, 1, 2, 3] Category: Default

stringA + stringB
Operand types: stringA: String stringB: String Type of returned value: String Description: stringA and stringB are concatenated. Example: "I" + " am" + " blind" , result is "I am blind"

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 7 of 415

Category: Default

-a
Operand types: a: Number Type of returned value: Number Description: unary minus: zero minus a Example: - - 3 , result is 3 Category: Default

a-b
Operand types: a: Number b: Number Type of returned value: Number Description: a minus b Example: counter - 1 Category: Default

arrayA - arrayB
Operand types: arrayA: Array arrayB: Array Type of returned value: Array Description: All elements in arrayB are removed from arrayA. Example: [0, 1, 2, 4, 0, 1, 2, 3, 4, 5] - [1, 2, 3] , result is [0, 4, 0, 4, 5] Category: Default

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 8 of 415

a/b
Operand types: a: Number b: Number Type of returned value: Number Description: a divided by b Example: enemyStrenght/3 Category: Default

config / name
Operand types: config: Config name: String Compatibility: Version 2.92 required. Type of returned value: Config Description: Returns subentry of config entry with given name (alias for >>). Example: configFile / "CfgVehicles" Category: OFP PC

a:b
Operand types: a: Switch Type b: Code Type of returned value: Nothing Description: see switch Category: Default

a<b
Operand types: a: Number

http://www.arma2.com/comref/full.html

7/11/2010

Type of returned value: http://www.com/comref/full.BIS Game Engine Scripting Commands Page 9 of 415 b: Number Type of returned value: Boolean Description: a lesser than b Example: counter < 4 Category: Default a <= b Operand types: a: Number b: Number Type of returned value: Boolean Description: a lesser or equal than b Example: player distance redCar <= 100 Category: Default display1 == display2 Operand types: display1: Display display2: Display Compatibility: Version 2.50 required.arma2. Type of returned value: Boolean Description: Checks whether two displays are equal.50 required. Category: OFP PC control1 == control2 Operand types: control1: Control control2: Control Compatibility: Version 2.html 7/11/2010 .

http://www.arma2. false is returned.com/comref/full. If either of them is objNull. Example: side player == west Category: OFP obj1 == obj2 Operand types: obj1: Object obj2: Object Type of returned value: Boolean Description: Checks whether two objects are the same. Example: player == leader player Category: OFP config1 == config2 Operand types: config1: Config config2: Config Compatibility: Version 2.58 required. Category: OFP PC side1 == side2 Operand types: side1: Side side2: Side Type of returned value: Boolean Description: Checks whether two side values are equal.html 7/11/2010 . Type of returned value: Boolean Description: Checks whether two config entries are equal.BIS Game Engine Scripting Commands Page 10 of 415 Boolean Description: Checks whether two controls are equal.

01 required. Type of returned value: Boolean Description: Checks whether two tasks are equal.92 required.com/comref/full. Type of returned value: Boolean Description: Checks whether two structured text values are equal. Category: OFP grp1 == grp2 Operand types: grp1: Group grp2: Group Type of returned value: Boolean Description: Checks whether two groups are the same. If either of them is grpNull.html 7/11/2010 . false is returned.arma2. Category: Identity text1 == text2 Operand types: text1: Structured text text2: Structured text Compatibility: Version 2.BIS Game Engine Scripting Commands Page 11 of 415 Category: OFP PC task1 == task2 Operand types: task1: Task task2: Task Compatibility: Version 2. Example: group player == group soldierOne Category: OFP a == b http://www.

false is returned.BIS Game Engine Scripting Commands Page 12 of 415 Operand types: a: Number b: Number Type of returned value: Boolean Description: a equal to b Example: counter == 4 Category: Default location1 == location2 Operand types: location1: Location location2: Location Type of returned value: Boolean Description: Checks whether two locations are the same.arma2.com/comref/full.html 7/11/2010 . Category: Location a == b Operand types: a: String b: String Type of returned value: Boolean Description: a equal to b (case insensitive) Example: nameOfPlayer == "John Doe" Category: Default a>b Operand types: a: Number b: Number Type of returned value: Boolean Description: http://www. If either of them is null.

com/comref/full.html 7/11/2010 .35 required.BIS Game Engine Scripting Commands Page 13 of 415 a greater than b Example: counter > 4 Category: Default a >= b Operand types: a: Number b: Number Type of returned value: Boolean Description: a greater or equal than b Example: player distance redCar < 100 Category: Default config >> name Operand types: config: Config name: String Compatibility: Version 2. Example: configFile >> "CfgVehicles" Category: OFP PC a^b Operand types: a: Number b: Number Type of returned value: Number Description: a raised to the power of b http://www. Type of returned value: Config Description: Returns subentry of config entry with given name.arma2.

result is 3 Category: Default accTime Type of returned value: Number Description: Returns the current time acceleration factor.html 7/11/2010 . Example: abs -3 .arma2.BIS Game Engine Scripting Commands Page 14 of 415 Example: count^4 Category: Default a || b Operand types: a: Boolean b: Boolean Type of returned value: Boolean Description: a or b Example: !alive player || !alive leader player Category: Default abs x Operand types: x: Number Type of returned value: Number Description: The absolute value of x.com/comref/full. Category: OFP acos x http://www.

target. Example: array = actionKeys "ReloadMagazine" Category: OFP actionKeysImages action or [action.BIS Game Engine Scripting Commands Page 15 of 415 Operand types: x: Number Type of returned value: Number Description: The arccosine of x.com/comref/full. target defaults to unit and param1. param3 are type specific. Type of returned value: Array Description: Returns a list of dikCodes of buttons assigned to the given user action. param2. Example: soldierOne action ["eject".01 required.arma2. The format of action can be [type. param1.5 .html 7/11/2010 . vehicle soldierOne] Category: OFP actionKeys action Operand types: action: String Compatibility: Version 2. Only type is required. param3]. maxKeys]: String or Array http://www. result is 60 Category: Default unit action action Operand types: unit: Object action: Array Type of returned value: Nothing Description: Makes the unit peform an action. maxKeys] Operand types: action or [action. param2. the result is in degrees. Example: acos 0.

32 required.. A maximum of maxKeys keys is listed. Example: list = actionKeysNames "ReloadMagazine" Category: OFP activateAddons [addon1.. maxKeys] Operand types: action or [action. .] Operand types: [addon1. maxKeys]: String or Array Compatibility: Version 2. You can find the action names in config class ControllerSchemes.01 required. Type of returned value: Structured text Description: Returns a list of button images or names assigned to the given user action. A maximum of maxKeys keys is listed.]: Array Compatibility: Version 2..BIS Game Engine Scripting Commands Page 16 of 415 Compatibility: Version 2.html 7/11/2010 . You can find the action names in config class ControllerSchemes. Type of returned value: String Description: Returns a list of button names assigned to the given user action. .arma2. Type of returned value: Nothing Description: Activates the listed addons. Example: text = actionKeysImages "ReloadMagazine" Category: OFP actionKeysNames action or [action.. The list of active addons is initialized during this function.com/comref/full.01 required. Example: activateAddons ["BISOFP"] Category: OFP activateKey keyName http://www.

priority. value1. Subtype class is optional. priority.06 required. subtype class]: Array Compatibility: Version 2.. condition)] Operand types: unit: Object [action. [name1. hideOnUse. Example: activateKey "M04" Category: OFP unit addAction [action.]. Type of returned value: Description: Creates an action. arguments. See keys. Type of returned value: String Description: Add an object to the editor and assign arguments. hideOnUse. The action ID should be returned. script filename(.html 7/11/2010 . value1.. but due to a bug. Category: Editor http://www. script filename(. etc.BIS Game Engine Scripting Commands Page 17 of 415 Operand types: keyName: String Compatibility: Version 2.. showWindow. Example: player addAction ["Hello".arma2. condition)]: Array Compatibility: Version 1. "hello. . showWindow.ext file of the missions. keysLimit and doneKeys in the description. The keys are used to unlock missions or campaigns. arguments.]. Type of returned value: Nothing Description: Activates the given key for the current user profile.10 required.sqs"] Category: OFP map addEditorObject [type. it's not. use following algorithm: the first action added to the given vehicle has ID zero. shortcut.92 required. shortcut. subtype class] Operand types: map: Control [type.. Create script is called with _new equal to true. To determine the action ID. [name1. Returns the ID of the new EditorObject. the next vehicle has ID one. .com/comref/full.

10 required.com/comref/full. Returns icon ID Example: id = group addGroupIcon["b_inf".ofsetY]] Category: OFP unit addLiveStats score Operand types: unit: Object score: Number Compatibility: Version 2.{_this exec "playerKilled. The index of the currently added handler is returned. Type of returned value: Description: The format of handler is [type.html 7/11/2010 .arma2. Example: player addEventHandler ["killed".[offsetX. Type of returned value: Number Description: Add icon to a group.command].BIS Game Engine Scripting Commands Page 18 of 415 object addEventHandler handler Operand types: object: Object handler: Array Compatibility: Version 1. Check scripting topic Event handlers for more information. Type of returned value: Nothing Description: Xbox Live MP only: adds score to the Xbox Live Statistics score for the given unit (or the commander unit of the given vehicle). Example: http://www.85 required.sqs"}] Category: OFP group addGroupIcon properties Operand types: group: Group properties: Array Compatibility: Version 5501 required.

The format of magazines is [magazineName. Example: player addMagazine "M16" Category: OFP unit addMagazineCargo magazines Operand types: unit: Object magazines: Array Type of returned value: Nothing Description: Adds magazines to the weapon cargo space.html 7/11/2010 . For magazineName values see CfgWeapons.arma2. When doing so.com/comref/full. for example by adding 20 grenades. Note: you may create invalid combinations by using this function. 10] Category: OFP addMagazinePool Compatibility: Version 1. count]. application behaviour is undefined.75 required. Example: rearmTruckOne addMagazineCargo ["M16". Category: Resistance http://www. This is used for infantry weapons. Type of returned value: Nothing Description: Adds count magazines of type name into the weapon pool (used in the campaign to transfer weapons to the next mission).BIS Game Engine Scripting Commands Page 19 of 415 player addLiveStats 10 Category: OFP unit addMagazine weaponName Operand types: unit: Object weaponName: String Type of returned value: Nothing Description: Adds a magazine to the unit.

priority]: Array Compatibility: Version 2. Priority is optional. index is index as returned from addMenu command.command.sqf"} Category: OFP unit addRating number http://www. priority is optional and determines where in the menu the item will reside (higher priority items first). Type of returned value: Number Description: Creates a new menu item.BIS Game Engine Scripting Commands Page 20 of 415 map addMenu [text. Example: "alarm" addPublicVariableEventHandler {_this execVM "alarm. Type of returned value: Number Description: Adds a new menu button. The event handler will be executed when some client in MP exports a variable using publicVariable on all clients except the publishing one. Menu can be "file" or "view".command.text.priority] Operand types: map: Control [text.com/comref/full. Category: Editor map addMenuItem [menu or index.arma2.html 7/11/2010 .text.priority]: Array Compatibility: Version 2.priority] Operand types: map: Control [menu or index. Category: Editor name addPublicVariableEventHandler code Operand types: name: String code: Code Type of returned value: Nothing Description: Create an event handler for given variable.92 required.92 required.

Example: player addScore 10 Category: OFP addSwitchableUnit person Operand types: person: Object Compatibility: Version 2. The rating for killed enemies and killed friendlies is adjusted automatically. Type of returned value: Nothing Description: Add a unit into the list of units available for team switch. This is usually used to reward for completed mission objectives. Example: player addRating 1000 Category: OFP unit addScore score Operand types: unit: Object score: Number Type of returned value: Nothing Description: MP only: adds unit score. a unit is considered "renegade" and is an enemy to everyone. Category: OFP group addVehicle vehicle Operand types: group: Group vehicle: Object http://www.arma2. This is shown in the "I" MP screen as the total score. When the rating is lower than zero.html 7/11/2010 .92 required.com/comref/full.BIS Game Engine Scripting Commands Page 21 of 415 Operand types: unit: Object number: Number Type of returned value: Nothing Description: Adds number to the unit rating.

Type of returned value: Array Description: Adds (or inserts when index is given) a new waypoint to a group. Type of returned value: Nothing Description: Tells the group it owns the vehicle now. index] Operand types: group: Group [center. index]. Example: grp addWaypoint [position player. radius.86 required. application behaviour is undefined.BIS Game Engine Scripting Commands Page 22 of 415 Compatibility: Version 5128 required. radius. index]: Array Compatibility: Version 1. radius] or [center. radius] or [center. Note: you may create invalid combinations by using this function. for example by adding two rifles. The waypoint is placed randomly in a circle with the given center and radius.arma2. Example: player addWeapon "AK74" Category: OFP unit addWeaponCargo weapons Operand types: unit: Object http://www.html 7/11/2010 . 0] Category: OFP unit addWeapon weaponName Operand types: unit: Object weaponName: String Type of returned value: Nothing Description: Adds the weapon to the unit. Category: OFP group addWaypoint [center. The function returns a waypoint with format [group.com/comref/full. When doing so.

Example: airportSide 0 .75 required. Type of returned value: Nothing Description: Adds count weapons of type name into the weapon pool (used in campaigns to transfer weapons to the next mission). count] Operand types: [name.unit. count]. count]: Array Compatibility: Version 1.com/comref/full. This is used for infantry weapons.arma2. result is west Category: OFP AISFinishHeal [unit.bool]: Array Compatibility: Version 5501 required. 10] Category: OFP addWeaponPool [name.bool] Operand types: [unit. Type of returned value: Nothing Description: Checks a side of the airport.unit.92 required.html 7/11/2010 . http://www.BIS Game Engine Scripting Commands Page 23 of 415 weapons: Array Type of returned value: Nothing Description: Adds weapons to the weapon cargo space. Category: Resistance airportSide airportId Operand types: airportId: Number Compatibility: Version 2. For weaponName values see CfgWeapons. Example: rearmTruckOne addWeaponCargo ["M16". The format of weapons is [weaponName.

com/comref/full. Type of returned value: Array Description: Return a list of all groups. vehicle or building is't dead / destroyed.92 required. Type of returned value: Nothing Description: Allow/dissallow 3D mode. Category: OFP map allow3DMode bool Operand types: map: Control bool: Boolean Compatibility: Version 2. Example: alive player Category: OFP allGroups Compatibility: Version 5501 required.html 7/11/2010 .arma2.true] Category: OFP alive obj Operand types: obj: Object Type of returned value: Boolean Description: Checks whether the given person. Example: AISFinishHeal [wounded.medic. Category: Editor http://www.BIS Game Engine Scripting Commands Page 24 of 415 Type of returned value: Nothing Description: AIS end state.

Category: OFP obj allowDammage allow Operand types: obj: Object allow: Boolean Type of returned value: Nothing Description: Obsolete.BIS Game Engine Scripting Commands Page 25 of 415 obj allowDamage allow Operand types: obj: Object allow: Boolean Type of returned value: Nothing Description: Obsolete. Category: OFP map allowFileOperations bool Operand types: map: Control bool: Boolean Compatibility: Version 2.92 required. Category: Editor unit allowFleeing courage Operand types: unit: Object or Group courage: Number Type of returned value: Nothing Description: http://www.arma2.com/comref/full. Type of returned value: Nothing Description: Allow/dissallow file ops (load/save etc).html 7/11/2010 .

BIS Game Engine Scripting Commands Page 26 of 415 Sets the group courage. Example: soldierOne allowFleeing 0 Category: OFP unitArray allowGetIn allow Operand types: unitArray: Array allow: Boolean Type of returned value: Nothing Description: Allows the getting in of vehicles of all units in the list.com/comref/full.arma2. Type of returned value: Array Description: Return a list of all units (all persons except agents). Example: [unitOne. Category: OFP unit ammo magazine Operand types: unit: Object magazine: String Type of returned value: Number Description: Counts how many shots the unit has left for the given magazine type. The less courage. 0 means maximum courage. Example: player ammo "M16" Category: OFP http://www. while 1 means always fleeing.html 7/11/2010 . the sooner the group will start fleeing. unitTwo] allowGetIn false Category: OFP allUnits Compatibility: Version 5501 required.

75 required. phase]: Array Compatibility: Version 1. Type of returned value: Nothing Description: Process animation on object.75 required.BIS Game Engine Scripting Commands Page 27 of 415 a and b Operand types: a: Boolean b: Boolean Type of returned value: Boolean Description: a and b Example: alive player and alive leader player Category: Default object animate [animation. Example: house animate ["doors1".com/comref/full. Type of returned value: Number Description: Return animation phase of animation on object. Animation is defined in config file. Wanted animation phase is set to phase.arma2. 1] Category: Resistance object animationPhase animation Operand types: object: Object animation: String Compatibility: Version 1. phase] Operand types: object: Object [animation.html 7/11/2010 . Example: house animationPhase "doors1" Category: Resistance http://www.

92 required.html 7/11/2010 . Category: OFP asin x Operand types: x: Number Type of returned value: Number Description: The arcsine of x.5 . Type of returned value: Number Description: Return the stored value of armory points.com/comref/full. the result is in degrees. Type of returned value: String Description: Return the name of the current primary animation.00 required. result is 30 Category: Default assert codition Operand types: codition: Boolean Compatibility: Version 2. Example: asin 0.arma2. Category: OFP armoryPoints Compatibility: Version 5500 required. Type of returned value: Boolean http://www.BIS Game Engine Scripting Commands Page 28 of 415 animationState man Operand types: man: Object Compatibility: Version 2.

halts the program.arma2. Example: assert (_x>0) Category: Default soldier assignAsCargo vehicle Operand types: soldier: Object vehicle: Object Type of returned value: Nothing Description: Assigns the soldier to the cargo / passenger space of the given vehicle.com/comref/full. Example: player assignAsCargo tankOne Category: OFP soldier assignAsCommander vehicle Operand types: soldier: Object vehicle: Object Type of returned value: Nothing Description: Assigns the soldier as commander of the given vehicle. http://www.html 7/11/2010 .BIS Game Engine Scripting Commands Page 29 of 415 Description: Tests a condition and if the condition is false. Example: player assignAsCommander tankOne Category: OFP soldier assignAsDriver vehicle Operand types: soldier: Object vehicle: Object Type of returned value: Nothing Description: Assigns the soldier as driver of the given vehicle.

com/comref/full.arma2. Type of returned value: Object Description: Returns the soldier assigned to the given vehicle as a commander. Type of returned value: Array Description: Returns the list of soldiers assigned to the given vehicle as a cargo.html 7/11/2010 . Example: player assignAsGunner tankOne Category: OFP assignedCargo vehicle Operand types: vehicle: Object Compatibility: Version 5501 required. Category: OFP assignedCommander vehicle Operand types: vehicle: Object Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 30 of 415 Example: player assignAsDriver tankOne Category: OFP soldier assignAsGunner vehicle Operand types: soldier: Object vehicle: Object Type of returned value: Nothing Description: Assigns the soldier as gunner of the given vehicle. Category: OFP http://www.

arma2.92 required.html 7/11/2010 . Type of returned value: Object Description: Return the target assigned to the vehicle. Type of returned value: Object Description: Returns the soldier assigned to the given vehicle as a driver.com/comref/full. Category: OFP assignedGunner vehicle Operand types: vehicle: Object Compatibility: Version 5501 required. Category: OFP assignedTarget vehicle Operand types: vehicle: Object Compatibility: Version 2.BIS Game Engine Scripting Commands Page 31 of 415 assignedDriver vehicle Operand types: vehicle: Object Compatibility: Version 5501 required. Category: OFP assignedVehicle person Operand types: person: Object Compatibility: Version 5130 required. Type of returned value: Object Description: Returns the soldier assigned to the given vehicle as a gunner. Type of returned value: Object Description: http://www.

BIS Game Engine Scripting Commands Page 32 of 415 Return the vehicle person is assigned to. Example: soldier2 assignTeam "RED" Category: OFP airplane assignToAirport airportId Operand types: airplane: Object airportId: Number Compatibility: Version 2.arma2. The possible team values are: "MAIN". Type of returned value: Nothing Description: Assigns the vehicle (specifically its commander unit) to the given team.html 7/11/2010 .05 required. "RED". "BLUE" and "YELLOW". Category: OFP vehicle assignTeam team Operand types: vehicle: Object team: String Compatibility: Version 2.92 required.com/comref/full. Type of returned value: Array Description: Return the position in vehicle person is assigned to. "GREEN". Category: OFP assignedVehicleRole person Operand types: person: Object Compatibility: Version 5130 required. Type of returned value: Nothing Description: Set airport to be used by AI on getout Example: http://www.

result is 45 Category: Default http://www.com/comref/full. Example: atan 1 .arma2. The returned value is in degrees.html 7/11/2010 . Example: 5 atan2 3 . result is 45 Category: Default x atan2 y Operand types: x: Number y: Number Type of returned value: Number Description: Returns the arctangens of x/y. Example: atg 1 . using the signs of both parameters to determine the quadrant of the returned value. result is 59. the result is in degrees.BIS Game Engine Scripting Commands Page 33 of 415 plane assignToAirport 0 Category: OFP atan x Operand types: x: Number Type of returned value: Number Description: The arctangens of x. in the range from -180 to +180.0362 Category: Default atg x Operand types: x: Number Type of returned value: Number Description: The arctangens of x. the result is in degrees.

Type of returned value: Nothing Description: Attach a object to given location. Category: Location obj attachTo [obj.html 7/11/2010 . [0. Category: Location location attachObject object Operand types: location: Location object: Object Compatibility: Version 2. MemPoint] Operand types: obj: Object [obj. offset.hatch1] Category: OFP attackEnabled group Operand types: http://www.arma2. The offset is applied to the object center unless a memory point is provided. Type of returned value: Object Description: Return object attached to given location.com/comref/full.90 required.BIS Game Engine Scripting Commands Page 34 of 415 attachedObject location Operand types: location: Location Compatibility: Version 2.2. Type of returned value: Nothing Description: Attaches an object to another object.0]. MemPoint]: Array Compatibility: Version 5501 required. offset.90 required. Example: player attachTo [car.

92 required. Type of returned value: Array Description: http://www."COMBAT" or "STEALTH"). Type of returned value: Boolean Description: Return whether leader can issue attack commands."SAFE". Category: OFP behaviour unit Operand types: unit: Object Type of returned value: String Description: Returns the behaviour mode of the given unit ("CARELESS". Example: ? benchmark>2000 : setviewdistance 2000 Category: OFP boundingBox object Operand types: object: Object Compatibility: Version 2.BIS Game Engine Scripting Commands Page 35 of 415 group: Object or Group Compatibility: Version 2.arma2.92 required. This can be used to estimate computer performance.com/comref/full."AWARE". Example: behaviour player Category: OFP benchmark Type of returned value: Number Description: Returns the value of "3D performance" as it is in OFP preferences. The function can be used to create missions that are able to adapt to computer peformance.html 7/11/2010 .

Nil is returned.com/comref/full. The result is in format [x. minY].html 7/11/2010 . Category: Default breakTo name Operand types: name: String Type of returned value: Nothing Description: Breaks block to scope named 'name'. minZ. [maxX. Nil is returned. z. The result is in format [[minX. Category: OFP boundingCenter object Operand types: object: Object Compatibility: Version 5501 required. y] Category: OFP breakOut name Operand types: name: String Type of returned value: Nothing Description: Breaks block out scope named 'name'. maxZ.arma2. Type of returned value: Array Description: Returns the position of original (loaded) center of object in model coordinates. Category: Default building buildingExit index Operand types: building: Object index: Number http://www. maxY]].BIS Game Engine Scripting Commands Page 36 of 415 Returns a bounding box of given object in model coordinates space.

Example: _action = buttonAction _button Category: OFP PC buttonAction idc Operand types: idc: Number Compatibility: Version 1.com/comref/full. 1] Category: OFP building buildingPos index Operand types: building: Object index: Number Type of returned value: Array Description: Returns the given indexed position in a building.50 required.92 required.BIS Game Engine Scripting Commands Page 37 of 415 Type of returned value: Array Description: Returns the given indexed exit in a building.arma2. Example: buildingExit [building. Example: building buildingPos 1 Category: OFP buttonAction control Operand types: control: Control Compatibility: Version 2. The returned value is in format Position. http://www. The action is any expression in this scripting language.html 7/11/2010 . Type of returned value: String Description: Returns the action assigned to the given button or active text. The returned value is in format Position.

The action is any expression in this scripting language. Action is any expression in this scripting language. Type of returned value: Nothing Description: Assigns an action to the control with id idc of the topmost user dialog. The function can be used for buttons and active texts. action] Operand types: [idc. The function can be used for buttons and active texts. Example: _action = buttonAction 100 Category: Resistance buttonSetAction [idc. "player exec ""reply.com/comref/full.sqs"""] Category: Resistance control buttonSetAction action Operand types: control: Control action: String Compatibility: Version 2. Example: _control buttonSetAction "player exec ""reply. Type of returned value: Nothing Description: Assigns an action to the given button or active text.arma2.BIS Game Engine Scripting Commands Page 38 of 415 Type of returned value: String Description: Returns the action assigned to the control with id idc of the topmost user dialog. Example: buttonSetAction [100.50 required.91 required. action]: Array Compatibility: Version 1.html 7/11/2010 .sqs""" Category: OFP PC cadetMode http://www. Action is any expression in this scripting language.

Category: OFP call code Operand types: code: Code Compatibility: Version 1.arma2. Example: call {"x=2"} Category: Default pars call body Operand types: pars: Any body: Code Compatibility: Version 1.85 required.com/comref/full. Argument pars is passed as _this. Example: [1. Type of returned value: Any Description: Executes the given code. Type of returned value: Any Description: Executes the function body.BIS Game Engine Scripting Commands Page 39 of 415 Type of returned value: Boolean Description: Returns true if the mission is played in cadet mode and false in veteran mode.html 7/11/2010 . result is 3 Category: Default camera camCommand command Operand types: camera: Object command: String Type of returned value: Nothing Description: http://www.2] call {(_this select 0)+(_this select 1)} .85 required.

For the "camera" type.html 7/11/2010 . Example: _camera camCommit 5 Category: OFP camCommitted camera Operand types: camera: Object Type of returned value: Boolean http://www. Example: _camera camCommit 5 Category: OFP camera camCommitPrepared time Operand types: camera: Object time: Number Compatibility: Version 2. A time of zero results in an immediate change.com/comref/full. Example: _camera camCommand "Manual on" Category: OFP camera camCommit time Operand types: camera: Object time: Number Type of returned value: Nothing Description: Commits the camera changes smoothly over time. Type of returned value: Nothing Description: Commits the prepared camera changes smoothly over time. The "manual on" and "manual off" commands are recognized for all types. For the "seagull" type it's one of: "landed" and "airborne".arma2. the following commands can be used: "inertia on" and "inertia off". A time of zero results in an immediate change.BIS Game Engine Scripting Commands Page 40 of 415 Executes a command on the given camera / actor object.95 required.

z].arma2.50.y. Type of returned value: Nothing Description: Sets construction camera parameters.BIS Game Engine Scripting Commands Page 41 of 415 Description: Checks whether the camera has finished committing. Its type is one of "CAMERA" or "SEAGULL".radius. Example: _camera camConstuctionSetParams [getpos player.20] Category: OFP type camCreate position Operand types: type: String position: Array Type of returned value: Object Description: Creates a camera or an actor of the given type on the given initial position (format Position). max above land] Operand types: camera: Object [[x.html 7/11/2010 . max above land]: Array Compatibility: Version 5501 required.radius.z]. Example: _camera = camCreate getPos player Category: OFP camDestroy camera Operand types: camera: Object Type of returned value: Nothing Description: http://www.y.com/comref/full. Example: camCommitted _camera Category: OFP camera camConstuctionSetParams [[x.

com/comref/full. Category: OFP camera cameraEffect effect Operand types: camera: Object effect: Array Type of returned value: Nothing Description: Switches the camera to the given vehicle / camera.html 7/11/2010 .BIS Game Engine Scripting Commands Page 42 of 415 Destroys the camera. Type of returned value: Nothing Description: Enable / disable showing of in-game UI during currently active camera effect. "External". "FRONT" or "BACK" ("BACK" is normally used).57 required. "RIGHT". Category: OFP cameraInterest entity Operand types: entity: Object Compatibility: Version 2. "Back"] Category: OFP cameraEffectEnableHUD enable Operand types: enable: Boolean Compatibility: Version 5501 required. Category: OFP http://www. "LEFT". The format of effect is [name. Name is one of: "Internal". Position is one of: "TOP". Type of returned value: Number Description: Return camera interest for given entity. position]. Example: cameraEffect ["External".arma2. "Fixed" or "FixedWithZoom".

90 required.56 required.BIS Game Engine Scripting Commands Page 43 of 415 cameraOn Compatibility: Version 1. Category: OFP campaignConfigFile Compatibility: Version 2. Time gives timeout. Type of returned value: Nothing Description: Preload the scene for he prepared camera. Type of returned value: Config Description: Return root of campaign description. Category: OFP cameraView Compatibility: Version 5501 required. Type of returned value: String Description: Return type of camera. zero means no (infinite) timeout.com/comref/full. Type of returned value: Object Description: Returns the vehicle to which the camera is attached.95 required.ext entries hierarchy. Category: OFP PC camera camPreload time Operand types: camera: Object time: Number Compatibility: Version 2.arma2. Example: _camera camCommit 5 http://www.html 7/11/2010 .

92 required.com/comref/full. Type of returned value: Nothing Description: Prepares the camera bank angle.95 required.95 required. Example: http://www.arma2. Type of returned value: Nothing Description: Prepares the camera heading. Type of returned value: Boolean Description: Checks whether the camera has finished preloading. Example: _camera camPrepareBank -0.BIS Game Engine Scripting Commands Page 44 of 415 Category: OFP camPreloaded camera Operand types: camera: Object Compatibility: Version 2. See also camPreload and camCommitPrepared.1 Category: OFP camera camPrepareDir direction Operand types: camera: Object direction: Number Compatibility: Version 2.html 7/11/2010 . See also camPreload and camCommitPrepared. Example: camPreloaded _camera Category: OFP camera camPrepareBank bank Operand types: camera: Object bank: Number Compatibility: Version 2.

com/comref/full.95 required.BIS Game Engine Scripting Commands Page 45 of 415 _camera camPrepareDir 150 Category: OFP camera camPrepareDive dive Operand types: camera: Object dive: Number Compatibility: Version 2.95 required. Type of returned value: Nothing Description: focusRange is in format [distance. Type of returned value: Nothing http://www. See also camPreload and camCommitPrepared. 1] Category: OFP camera camPrepareFov fieldOfView Operand types: camera: Object fieldOfView: Number Compatibility: Version 2. See also camPreload and camCommitPrepared. Example: _camera camPrepareDive -0.blur].arma2. Example: _camera camPrepareFocus [50.1 Category: OFP camera camPrepareFocus focusRange Operand types: camera: Object focusRange: Array Compatibility: Version 2.html 7/11/2010 . Prepares the camera focus blur. Type of returned value: Nothing Description: Prepares the camera dive angle.95 required.

See also camPreload and camCommitPrepared.1 Category: OFP camera camPrepareFovRange fovRange Operand types: camera: Object fovRange: Array Compatibility: Version 2.arma2. Type of returned value: Nothing Description: Prepares the camera field of view range for auto zooming.95 required.com/comref/full. See also camPreload and camCommitPrepared. Example: _camera camPreparePos getPos player Category: OFP camera camPrepareRelPos position Operand types: camera: Object position: Array http://www.BIS Game Engine Scripting Commands Page 46 of 415 Description: Prepares the camera field of view (zoom). Type of returned value: Nothing Description: Prepares the camera position (format Position). 0.95 required.1.html 7/11/2010 . Example: _camera camPrepareFovRange [0. Example: _camera camPrepareFov 0. See also camPreload and camCommitPrepared.5] Category: OFP camera camPreparePos position Operand types: camera: Object position: Array Compatibility: Version 2.

arma2.95 required. Type of returned value: Nothing Description: Prepares the camera position relative to the current position of the currect target (see camPrepareTarget). Example: _camera camPrepareTarget player Category: OFP camera camSetBank bank http://www. See also camPreload and camCommitPrepared.BIS Game Engine Scripting Commands Page 47 of 415 Compatibility: Version 2.5] Category: OFP camera camPrepareTarget position Operand types: camera: Object position: Array Compatibility: Version 2. Type of returned value: Nothing Description: Prepares the camera target.com/comref/full. Type of returned value: Nothing Description: Prepares the camera target to a position (format Position). See also camPreload and camCommitPrepared. Example: _camera camPrepareRelPos [10. Example: _camera camPrepareTarget getPos player Category: OFP camera camPrepareTarget target Operand types: camera: Object target: Object Compatibility: Version 2.html 7/11/2010 . See also camPreload and camCommitPrepared.95 required.95 required.

1 Category: OFP camera camSetFocus focusRange Operand types: camera: Object focusRange: Array http://www. It does not automatically commit changes. Example: _camera camSetBank -0.BIS Game Engine Scripting Commands Page 48 of 415 Operand types: camera: Object bank: Number Type of returned value: Nothing Description: Sets the camera bank angle.arma2. It does not automatically commit changes. Example: _camera camSetDir 150 Category: OFP camera camSetDive dive Operand types: camera: Object dive: Number Type of returned value: Nothing Description: Sets the camera dive angle. Example: _camera camSetDive -0. It does not automatically commit changes.html 7/11/2010 .com/comref/full.1 Category: OFP camera camSetDir direction Operand types: camera: Object direction: Number Type of returned value: Nothing Description: Sets the camera heading.

html 7/11/2010 . Example: _camera camSetFovRange [0.com/comref/full. 0.blur].BIS Game Engine Scripting Commands Page 49 of 415 Type of returned value: Nothing Description: focusRange is in format [distance. Sets the camera focus blur. Example: _camera camSetFocus [50. It does not automatically commit changes.1 Category: OFP camera camSetFovRange fovRange Operand types: camera: Object fovRange: Array Type of returned value: Nothing Description: Sets the camera field of view range for auto zooming.1. It does not automatically commit changes. Example: _camera camSetFov 0. 1] Category: OFP camera camSetFov fieldOfView Operand types: camera: Object fieldOfView: Number Type of returned value: Nothing Description: Sets the camera field of view (zoom).arma2. It does not automatically commit changes.5] Category: OFP camera camSetPos position Operand types: camera: Object position: Array Type of returned value: Nothing http://www.

BIS Game Engine Scripting Commands Page 50 of 415 Description: Sets the camera position (format Position). Example: _camera camSetTarget player Category: OFP camera camSetTarget position Operand types: camera: Object position: Array Type of returned value: Nothing Description: Sets the camera target to a position (format Position). It does not automatically commit changes.html 7/11/2010 . It does not automatically commit changes. Example: _camera camSetPos getPos player Category: OFP camera camSetRelPos position Operand types: camera: Object position: Array Type of returned value: Nothing Description: Sets the camera position relative to the current position of the currect target (see camSetTarget). It does not automatically commit changes. It does not automatically commit changes.com/comref/full. http://www. Example: _camera camSetRelPos [10.arma2.5] Category: OFP camera camSetTarget target Operand types: camera: Object target: Object Type of returned value: Nothing Description: Sets the camera target.

arma2.73 required. Type of returned value: Object Description: Returns camera's target. Type of returned value: Nothing Description: Set / clear using of night vision during cutscenes. Category: OFP canFire vehicle Operand types: vehicle: Object Type of returned value: Boolean Description: Checks whether the given vehicle is able to fire. It does not check for ammo.com/comref/full. Example: canFire vehicle player Category: OFP http://www. only for damage.BIS Game Engine Scripting Commands Page 51 of 415 Example: _camera camSetTarget getPos player Category: OFP camTarget camera Operand types: camera: Object Compatibility: Version 5501 required.html 7/11/2010 . Example: camTarget _camera Category: OFP camUseNVG set Operand types: set: Boolean Compatibility: Version 2.

com/comref/full.arma2. Example: canStand player Category: OFP canUnloadInCombat vehicle Operand types: vehicle: Object Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 52 of 415 canMove vehicle Operand types: vehicle: Object Type of returned value: Boolean Description: Checks whether the given vehicle is able to move. It does not test for fuel. Category: OFP captive unit Operand types: unit: Object http://www.html 7/11/2010 . Type of returned value: Boolean Description: Check if cargo of this vehicle want to get out when in combat. only the damage status is checked. Example: canMove vehicle player Category: OFP canStand soldier Operand types: soldier: Object Type of returned value: Boolean Description: Checks whether the given soldier is able to stand up.

Example: captive player Category: OFP captiveNum unit Operand types: unit: Object Type of returned value: Number Description: Checks whether the unit is a captive.BIS Game Engine Scripting Commands Page 53 of 415 Type of returned value: Boolean Description: Checks whether the unit is a captive. If the unit is a vehicle. If the unit is a vehicle. its commander is checked instead. Example: captive player Category: OFP case b Operand types: b: Any Type of returned value: Switch Type Description: see switch Category: Default try-Block catch code Operand types: try-Block: Exception Type code: Code Type of returned value: Any Description: processes code.com/comref/full. when exception is thrown in try block Category: Default http://www.html 7/11/2010 .arma2. its commander is checked instead.

com/comref/full. Category: OFP clearGroupIcons group Operand types: group: Group Compatibility: Version 5501 required. Category: Resistance civilian Type of returned value: Side Description: The Civilian side. Example: ceil 5.56 required.arma2. Type of returned value: Boolean Description: Checks whether cheats are enabled (whether the designers' version is running). Type of returned value: Nothing Description: Removes all icon from group.html 7/11/2010 . result is 6 Category: Default cheatsEnabled Compatibility: Version 1.BIS Game Engine Scripting Commands Page 54 of 415 ceil x Operand types: x: Number Type of returned value: Number Description: The ceil value of x. Example: clearGroupIcons group http://www.25 .

com/comref/full. Example: clearOverlay _map Category: Editor clearRadio http://www.92 required.arma2.75 required. Type of returned value: Nothing Description: Removes all magazines from the weapon pool (this is used in campaigns to transfer weapons to the next mission). Category: Resistance clearOverlay map Operand types: map: Control Compatibility: Version 2. Example: clearMagazineCargo jeepOne Category: OFP clearMagazinePool Compatibility: Version 1.BIS Game Engine Scripting Commands Page 55 of 415 Category: OFP clearMagazineCargo unit Operand types: unit: Object Type of returned value: Nothing Description: Removes all magazines from the vehicle cargo space. Type of returned value: Nothing Description: Clear the current overlay.html 7/11/2010 .

html 7/11/2010 . Category: OFP clearVehicleInit vehicle Operand types: vehicle: Object Compatibility: Version 5154 required. Example: clearWeaponCargo jeepOne Category: OFP clearWeaponPool Compatibility: Version 1. Type of returned value: Nothing Description: Removes all weapons from the weapon pool (this is used in campaigns to transfer weapons to the next mission). http://www. Example: clearVehicleInit soldier3 Category: OFP clearWeaponCargo unit Operand types: unit: Object Type of returned value: Nothing Description: Removes all weapons from the vehicle cargo space.BIS Game Engine Scripting Commands Page 56 of 415 Compatibility: Version 2.73 required.75 required. Type of returned value: Nothing Description: Clean up the content of radio protocol history.com/comref/full.arma2. Type of returned value: Nothing Description: Clear vehicle init field.

Example: _display closeDisplay IDC_OK Category: OFP PC closeOverlay map Operand types: map: Control Compatibility: Version 2.com/comref/full.92 required.53 required. Type of returned value: Nothing Description: Closes the topmost user dialog as if a button with id idc was pressed.arma2. Type of returned value: Nothing Description: Close given display.html 7/11/2010 . Example: closeDialog 1 Category: Resistance display closeDisplay exitcode Operand types: display: Display exitcode: Number Compatibility: Version 2.50 required. Category: Editor http://www. Type of returned value: Nothing Description: Closes the current overlay without committing.BIS Game Engine Scripting Commands Page 57 of 415 Category: Resistance closeDialog idc Operand types: idc: Number Compatibility: Version 1.

it does not broadcast the message."YELLOW" or "RED"). Type of returned value: Nothing Description: Types text to the command radio channel. Example: collapseObjectTree _map Category: Editor combatMode grp Operand types: grp: Object or Group Type of returned value: String Description: Returns the combat mode of the given unit ("BLUE". Example: soldierOne commandChat "Show this text" Category: OFP http://www. Type of returned value: Nothing Description: Collapse the object tree. you have to execute it on all of them. Example: combatMode group player Category: OFP unit commandChat chatText Operand types: unit: Object or Array chatText: String Compatibility: Version 5501 required. If you want the message to show on all computers."GREEN". Note: this function only types text to the list.arma2.BIS Game Engine Scripting Commands Page 58 of 415 collapseObjectTree map Operand types: map: Control Compatibility: Version 2.92 required.com/comref/full.html 7/11/2010 .

the person is returned instead. If the vehicle is not a vehicle. If the target is objNull. but a person.com/comref/full. Example: soldierOne commandFollow player Category: OFP http://www. Example: commander vehicle player Category: OFP unit commandFire target Operand types: unit: Object or Array target: Object Type of returned value: Nothing Description: Orders a unit to commence firing on the given target (via the radio).arma2.html 7/11/2010 . Example: soldierOne commandFire player Category: OFP unit commandFollow formationLeader Operand types: unit: Object or Array formationLeader: Object Type of returned value: Nothing Description: Orders a unit to follow the given unit (via the radio). the unit is ordered to commence firing on its current target (set using doTarget or commandTarget).BIS Game Engine Scripting Commands Page 59 of 415 commander vehicle Operand types: vehicle: Object Type of returned value: Object Description: Returns the commander of the vehicle.

arma2.28 required. Category: OFP unit commandMove position Operand types: unit: Object or Array http://www. target] Operand types: unit(s): Object or Array [fsm name. Type of returned value: Nothing Description: Orders the unit to get out from the vehicle (via the radio). position. target]: Array Compatibility: Version 2.53 required. Example: commandGetOut unitOne Category: OFP commandingMenu Compatibility: Version 5501 required. position. player] Category: OFP PC commandGetOut unit Operand types: unit: Object or Array Compatibility: Version 2.BIS Game Engine Scripting Commands Page 60 of 415 unit(s) commandFSM [fsm name. position player. Example: soldierOne commandFSM ["move.fsm".html 7/11/2010 .com/comref/full. Type of returned value: String Description: Return the name of the topmost commanding menu. Type of returned value: Nothing Description: Orders a unit to process command defined by FSM file (via the radio).

Example: soldierOne commandRadio "messageOne" Category: OFP commandStop unit Operand types: unit: Object or Array Type of returned value: Nothing Description: Orders the unit to stop (via the radio).arma2.BIS Game Engine Scripting Commands Page 61 of 415 position: Array Type of returned value: Nothing Description: Orders the unit to move to the given position (format Position) (via the radio).html 7/11/2010 . Type of returned value: Nothing Description: Sends the message to the command radio channel. the unit will never be ready.ext file or radio protocol.com/comref/full. Example: soldierOne commandMove getMarkerPos "MarkerMoveOne" Category: OFP unit commandRadio radioName Operand types: unit: Object or Array radioName: String Compatibility: Version 5501 required. The message is defined in the description. Example: commandStop unitOne Category: OFP unit commandTarget position Operand types: unit: Object or Array http://www. Note: the stop command is never finished.

com/comref/full.85 required. Example: soldierOne commandWatch player Category: OFP comment comment Operand types: comment: String Compatibility: Version 1. Example: soldierOne commandWatch getMarkerPos "MarkerMoveOne" Category: OFP unit commandWatch target Operand types: unit: Object or Array target: Object Type of returned value: Nothing Description: Orders the unit to watch the given target (via the radio).arma2. Example: soldierOne commandTarget player Category: OFP unit commandWatch position Operand types: unit: Object or Array position: Array Type of returned value: Nothing Description: Orders the unit to watch the given position (format Position) (via the radio). Type of returned value: http://www.BIS Game Engine Scripting Commands Page 62 of 415 position: Object Type of returned value: Nothing Description: Orders the unit to target the given target (via the radio).html 7/11/2010 .

" Category: Default commitOverlay map Operand types: map: Control Compatibility: Version 2. Example: commitOverlay _map Category: Editor compile expression Operand types: expression: String Compatibility: Version 2.60 required. Example: comment "This is a comment. Category: Default completedFSM FSM handle Operand types: FSM handle: Number Compatibility: Version 5500 required. Type of returned value: http://www.arma2. _compiled = compile _function.com/comref/full. Type of returned value: Code Description: Compile expression. Type of returned value: Nothing Description: Commit the current overlay.BIS Game Engine Scripting Commands Page 63 of 415 Nothing Description: This function does nothing. It's used to create comments. call _compiled.html 7/11/2010 . Example: _function = "a = a + 1".92 required.

image "data\isniper.]: Array Compatibility: Version 2. result is "CfgVehicles" http://www..35 required. Type of returned value: Structured text Description: Creates a structured text by joining the given structured or plain texts..] Operand types: [text1. lineBreak. text2. "Second line"] Category: OFP configFile Compatibility: Version 2.arma2. Category: OFP composeText [text1. Example: _name = configName (configFile >> "CfgVehicles") . Example: txt = composeText ["First line".BIS Game Engine Scripting Commands Page 64 of 415 Boolean Description: Check whether the given FSM completes.com/comref/full.html 7/11/2010 .. .35 required. Type of returned value: Config Description: Return root of config entries hierarchy. Type of returned value: String Description: Returns name of config entry.paa".01 required. Category: OFP PC configName config Operand types: config: Config Compatibility: Version 2. .. The FSM handle is the number returned by the execFSM command. text2.

including itself.BIS Game Engine Scripting Commands Page 65 of 415 Category: OFP PC controlNull Compatibility: Version 2. Type of returned value: Nothing http://www.92 required. This value is not equal to anything.com/comref/full.arma2.html 7/11/2010 . Type of returned value: String Description: Return the content of the (text) clipboard. Type of returned value: Control Description: A non-existing control. Category: OFP PC copyFromClipboard Compatibility: Version 5500 required. Category: OFP copyToClipboard text Operand types: text: String Compatibility: Version 5500 required. Category: OFP groupTo copyWaypoints groupFrom Operand types: groupTo: Group groupFrom: Group Compatibility: Version 5500 required. Type of returned value: Nothing Description: Copy the text to the clipboard.

Example: cos 60 .2] .arma2. Category: OFP cos x Operand types: x: Number Type of returned value: Number Description: The cosine of x. Example: count [0.35 required. result is 0. result is 4 http://www.1. Example: _count = count (configFile >> "CfgVehicles") Category: OFP PC count array Operand types: array: Array Type of returned value: Number Description: The number of elements in the array. Type of returned value: Number Description: Returns count of subentries. the argument is in degrees.5 Category: Default count config Operand types: config: Config Compatibility: Version 2. The target group will start to process waypoints from the first one.BIS Game Engine Scripting Commands Page 66 of 415 Description: Copy the chain of waypoints from source to target group.0.com/comref/full.html 7/11/2010 .

BIS Game Engine Scripting Commands Page 67 of 415 Category: Default condition count array Operand types: condition: Code array: Array Type of returned value: Number Description: Counts the elements in the array for which the given condition is true. 2) For each element in the array assign an element as _x and evaluate the condition expression.arma2. Example: player countEnemy list triggerOne Category: OFP unit countFriendly array Operand types: unit: Object array: Array Type of returned value: Number Description: Counts how many units in the array are considered friendly by the given unit. If it's true. Example: "_x > 2" count [0. Example: player countFriendly list triggerOne Category: OFP http://www. 1. 2.html 7/11/2010 . result is 2 Category: Default unit countEnemy array Operand types: unit: Object array: Array Type of returned value: Number Description: Counts how many units in the array are considered enemy by the given unit. It is calculated as follows: 1) Set the count to 0. 3] . 3.com/comref/full. 1. increase the count.

For types see CfgVehicles. special] http://www. Example: player countUnknown list triggerOne Category: OFP createAgent [type.BIS Game Engine Scripting Commands Page 68 of 415 side countSide array Operand types: side: Side array: Array Type of returned value: Number Description: Checks how many vehicles belong to the given side.html 7/11/2010 . markers.com/comref/full.arma2. position. placement. Example: "Tank" countType list triggerOne Category: OFP unit countUnknown array Operand types: unit: Object array: Array Type of returned value: Number Description: Counts how many units in the array are considered unknown to the given unit. Example: west countSide list triggerOne Category: OFP typeName countType array Operand types: typeName: String array: Array Type of returned value: Number Description: Counts how many vehicles in the array are of the given type.

50 required. The unit is placed inside a circle with this position as its center and placement as its radius. "FORM"] Category: OFP createCenter side Operand types: side: Side Compatibility: Version 1. markers. Example: center = createCenter East Category: OFP createDialog name Operand types: name: String Compatibility: Version 1. the position of a random one is used. The function returns its success.ext file of the campaign and the globlal resource.html 7/11/2010 . special]: Array Compatibility: Version 2. Type of returned value: Boolean Description: Creates a user dialog from the resource template name. []. position player.cpp file.89 required. Otherwise. The class name is searched in the description.ext file of the mission.86 required. it creates a child dialog of the topmost user dialog. 0.BIS Game Engine Scripting Commands Page 69 of 415 Operand types: [type. If a user dialog already exists. If the markers array contains several marker names. the description.arma2. Example: agent = createAgent ["SoldierWB". placement. Type of returned value: Object Description: Creates an (independent) agent (person) of the given type (type is a name of a subclass of CfgVehicles). Type of returned value: Side Description: Creates a new AI center for the given side. the given position is used. Special properties can be: "NONE" and "FORM". Example: _ok = createDialog "RscDisplayGame" Category: Resistance http://www.com/comref/full. position.

player. Example: http://www. Type of returned value: String Description: Create a link to the section of diary given by subject. Example: _record = player createDiaryRecord ["diary".com/comref/full. text](. text(. text(. "Kill all enemies.html 7/11/2010 . display name. task(. state))] Operand types: person: Object [subject. Example: _link = createDiarySubject ["Group". object."] Category: Identity person createDiarySubject [subject. picture]: Array Compatibility: Version 2. task(. text] Operand types: [subject. object. task(. task or unit). display name] or [subject. Record is selected based on given object (diary record.92 required. state))] or [subject. [title. "Player"] Category: Identity person createDiaryRecord [subject.arma2.BIS Game Engine Scripting Commands Page 70 of 415 createDiaryLink [subject. Type of returned value: Number Description: Create a new subject page in a log. state))]: Array Compatibility: Version 2. task(. state))] or [subject. display name] or [subject. text](. picture] Operand types: person: Object [subject. display name. Type of returned value: Diary record Description: Create a new record in a log. [title.53 required. text]: Array Compatibility: Version 5500 required.

Example: CreateGearDialog [palyer. Type of returned value: Group Description: Creates a new AI group for the given center (side). http://www. Type of returned value: Nothing Description: Create child display of given display and load from resource "name". "My page"] Category: Identity parent createDisplay name Operand types: parent: Display name: String Compatibility: Version 2.BIS Game Engine Scripting Commands Page 71 of 415 _index = player createDiarySubject ["myPage".resource]: Array Compatibility: Version 5501 required.com/comref/full. Type of returned value: Nothing Description: Opens gear dialog for given unit."RscDisplayGear"] Category: OFP createGroup side Operand types: side: Side Compatibility: Version 1.arma2.86 required.53 required.html 7/11/2010 .resource] Operand types: [unit. Example: _display createDisplay "RscObserver" Category: OFP PC CreateGearDialog [unit.

-1. idStatic. vehicle]: Array Compatibility: Version 1.86 required. idStatic. 0]. Type of returned value: Location Description: Create location of given type with given size at given position. position. The marker is created on all computers in a network session.90 required. If idStatic is not negative.86 required. http://www. The marker name has to be unique. [0. position. the position of a static object with the given id is guarded.BIS Game Engine Scripting Commands Page 72 of 415 Example: group = createGroup East Category: OFP createGuardedPoint [side. sizeZ]: Array Compatibility: Version 2. Category: Location createMarker [name. position. sizeX. the starting position of the vehicle is guarded. otherwise the given position is guarded. Example: point = createGuardedPoint [East. position] Operand types: [name. vehicle player] Category: OFP createLocation [type.com/comref/full. sizeZ] Operand types: [type.html 7/11/2010 . vehicle] Operand types: [side. If the given vehicle is valid. Type of returned value: Nothing Description: Adds a point guarded by the given side. Type of returned value: String Description: Creates a new marker on the given position. sizeX.arma2. position. position]: Array Compatibility: Version 1.

position. markers. the given position is used. position] Operand types: [name.com/comref/full. the position of a random one is used. The marker is only created on the computer where the command is called.html 7/11/2010 . The mine is placed inside a circle with this position as its center and placement as its http://www. position player] Category: OFP map createMenu index Operand types: map: Control index: Number Compatibility: Version 2.arma2. Type of returned value: Object Description: Creates a mine of the given type (type is the name of the subclass of CfgVehicles).92 required.BIS Game Engine Scripting Commands Page 73 of 415 Example: marker = createMarker [Marker1. Category: Editor createMine [type. position. placement]: Array Compatibility: Version 2. The marker name has to be unique. Type of returned value: Nothing Description: Creates a previously added menu. Otherwise. Example: marker = createMarkerLocal [Marker1.92 required. position player] Category: OFP createMarkerLocal [name. position]: Array Compatibility: Version 2.32 required. markers. Type of returned value: String Description: Creates a new marker on the given position. placement] Operand types: [type. If the markers array contains several marker names.

placement] Operand types: [type.BIS Game Engine Scripting Commands Page 74 of 415 radius. Type of returned value: Display Description: Create single missions display as a child of given display. parentTask]: Array Compatibility: Version 5500 required. markers.32 required. 0] Category: OFP parent createMissionDisplay root Operand types: parent: Display root: String Compatibility: Version 5140 required.arma2.html 7/11/2010 . position. Example: mine = createMine ["MineMine". markers. []. Category: Identity createSoundSource [type. parentTask] Operand types: person: Object [name] or [name. The mission dialog will be set to the directory given as an argument "root". Type of returned value: Task Description: Create a new simple task (subtask of parentTask). position player. Example: _display createMissionDisplay "Tutorial" Category: OFP PC person createSimpleTask [name] or [name. Type of returned value: Object Description: http://www.com/comref/full. placement]: Array Compatibility: Version 2. position.

.com/comref/full. position player] Category: OFP group createUnit [type. markers. value2. name1. Category: Identity createTrigger [type. . priority.86 required. parentTask]. Example: soundSource = createSoundSource ["LittleDog". name1. position. Type of returned value: Task Description: Create a new AI task (subtask of parentTask). the position of a random one is used. the given position is used. If the markers array contains several marker names. this type must be a class name in CfgNonAIVehicles or CfgVehicles with simulation=detector. Otherwise. [].html 7/11/2010 . An object of the given type is created. placement. Example: trigger = createTrigger["EmptyDetector".arma2.. 0] Category: OFP teamMember createTask [[type] or [type. placement. The sound source is placed inside a circle with this position as its center and placement as its radius. position] Operand types: [type.BIS Game Engine Scripting Commands Page 75 of 415 Creates a sound source of the given type (type is the name of the subclass of CfgVehicles).] Operand types: teamMember: [[type] or [type. priority. value1. special]: Array Compatibility: http://www. name2. special] Operand types: group: Group [type. value2..62 required. Type is name of registered task type. position player. . position.. Type of returned value: Object Description: Creates a new trigger on the given position. position]: Array Compatibility: Version 1. value1. name2. markers. parentTask].]: Array Compatibility: Version 2.

"PRIVATE". skill (Number). Type of returned value: Nothing Description: Creates a unit of the given type. "FLY"] Category: OFP http://www. The vehicle is placed inside a circle with this position as center and placement as its radius. Example: "SoldierWB" createUnit [getMarkerPos "barracks". group (Group). special] Operand types: [type. the position of a random one is used. []. position. Note: init. position player.5.BIS Game Engine Scripting Commands Page 76 of 415 Version 2. the position of a random one is used. The format of unitInfo is: [pos (Position). the given position is used. 0. 0.32 required. "FORM"] Category: OFP type createUnit unitInfo Operand types: type: String unitInfo: Array Compatibility: Version 1. init (String). If the markers array contains several marker names.arma2. Special properties can be: "NONE" and "FORM". Example: unit = group player createUnit ["SoldierWB". markers. rank (String)]. markers.html 7/11/2010 . Example: veh = createVehicle ["Cobra". position player. 0. skill and rank are optional. position. the given position is used. Type of returned value: Object Description: Creates a vehicle of the given type (type is the name of the subclass in CfgVehicles).32 required.com/comref/full. Their default values are "". placement. Type of returned value: Object Description: Creates a unit (person) of the given type (type is a name of a subclass of CfgVehicles) and makes it a member of the given group. placement. If the markers array contains several marker names.34 required. "FLY" and "FORM". []. The unit is placed inside a circle with this position as its center and placement as its radius. Special properties can be: "NONE". Otherwise. special]: Array Compatibility: Version 2. Otherwise. groupAlpha] Category: OFP createVehicle [type.

html 7/11/2010 . Type of returned value: Object Description: Creates an empty vehicle of the given type.34 required. See CfgVehicles for possible type values. Example: _tank = "M1Abrams" createVehicle getmarkerpos "tankFactory" Category: OFP type createVehicleLocal pos Operand types: type: String pos: Array Compatibility: Version 2. If the vehicle is not a vehicle. Vehicle is not transferred through network in MP games. See CfgVehicles for possible type values. but person. Example: _tank = "M1Abrams" createVehicleLocal getmarkerpos "tankFactory" Category: OFP crew vehicle Operand types: vehicle: Object Type of returned value: Array Description: Returns all units mounted in the given vehicle. Type of returned value: Object Description: Creates an empty vehicle of the given type. Example: crew vehicle player http://www.56 required. Pos is in format Position.com/comref/full. Pos is in format Position.arma2.BIS Game Engine Scripting Commands Page 77 of 415 type createVehicle pos Operand types: type: String pos: Array Compatibility: Version 1. a list containing only persons is returned.

Example: _id = _control ctrlAddEventHandler ["KeyDown".BIS Game Engine Scripting Commands Page 78 of 415 Category: OFP ctrlActivate control Operand types: control: Control Compatibility: Version 2. function] Operand types: control: Control [handler name. function]: Array Compatibility: Version 5501 required. Example: ctrlActivate _control Category: OFP PC control ctrlAddEventHandler [handler name.html 7/11/2010 .arma2. Type of returned value: Number Description: Add an event handler to the given control.com/comref/full. Example: _delay = ctrlAutoScrollDelay _control http://www.92 required. Type of returned value: Nothing Description: Launch actions attached to given (button based) control. -2 if scrollbar not present. ""] Category: OFP PC ctrlAutoScrollDelay control Operand types: control: Control Compatibility: Version 5501 required. Type of returned value: Number Description: Returns number of seconds until auto-scroll starts. Returns id of the handler or -1 when failed.

arma2.html 7/11/2010 . Example: _speed = ctrlAutoScrollSpeed _control Category: OFP PC control ctrlCommit time Operand types: control: Control time: Number Compatibility: Version 2.50 required.BIS Game Engine Scripting Commands Page 79 of 415 Category: OFP PC ctrlAutoScrollRewind control Operand types: control: Control Compatibility: Version 5501 required. Type of returned value: Nothing Description: Commit control animation.com/comref/full. Type of returned value: Boolean Description: True if auto-scroll should move back to start after it reach end. -2 if scrollbar not present. -1 if auto-scroll is disabled. Type of returned value: Number Description: Returns number of seconds to auto-scroll one line. http://www. Example: _rewind = ctrlAutoScrollRewind _control Category: OFP PC ctrlAutoScrollSpeed control Operand types: control: Control Compatibility: Version 5501 required.

Type of returned value: Nothing Description: Enable / disable given control. enable]: Array Compatibility: Version 1.BIS Game Engine Scripting Commands Page 80 of 415 Example: _control ctrlCommit 2 Category: OFP PC ctrlCommitted control Operand types: control: Control Compatibility: Version 2. Type of returned value: Boolean Description: Check if the control animation is finished.50 required.arma2.com/comref/full. enable] Operand types: [idc. Example: _done = ctrlCommitted _control Category: OFP PC ctrlEnable [idc. http://www.html 7/11/2010 .50 required. false] Category: Resistance control ctrlEnable enable Operand types: control: Control enable: Boolean Compatibility: Version 2.50 required. Example: ctrlEnable [100. Type of returned value: Nothing Description: Enables / disables the control with id idc of the topmost user dialog.

Type of returned value: Boolean Description: Returns whether the control with id idc of the topmost user dialog is enabled.50 required. Example: _ok = ctrlEnabled _control Category: OFP PC ctrlEnabled idc Operand types: idc: Number Compatibility: Version 1.arma2. Type of returned value: Boolean Description: Returns whether given control is enabled. Example: _enabled = ctrlEnabled 100 Category: Resistance ctrlFade control Operand types: control: Control Compatibility: Version 2.com/comref/full. Type of returned value: Number Description: Returns the current fade factor of control.html 7/11/2010 .50 required.BIS Game Engine Scripting Commands Page 81 of 415 Example: _control ctrlEnable false Category: OFP PC ctrlEnabled control Operand types: control: Control Compatibility: Version 2.50 required. http://www.

The format of frame is [time. position]. Category: OFP PC ctrlMapAnimCommit control Operand types: control: Control Compatibility: Version 2. Type of returned value: Nothing Description: Clears the map animation.html 7/11/2010 .92 required.arma2. Type of returned value: Nothing Description: Plays the map animation. zoom.com/comref/full.BIS Game Engine Scripting Commands Page 82 of 415 Example: _scale = ctrlFade _control Category: OFP PC map ctrlMapAnimAdd frame Operand types: map: Control frame: Array Compatibility: Version 1.92 required. getMarkerPos "anim1"] Category: OFP PC ctrlMapAnimClear control Operand types: control: Control Compatibility: Version 2. the format of position is Position2D.92 required. http://www. Example: _map ctrlMapAnimAdd [1. Type of returned value: Nothing Description: Adds the next frame to the map animation.1. 0.

"Scroll") to custom one. Category: OFP PC control ctrlMapCursor texture names Operand types: control: Control texture names: Array Compatibility: Version 5501 required. Type of returned value: Nothing Description: Changes default cursor texture ("Track". Type of returned value: Array Description: Returns description of map sign mouse cursor is over."Array". If new texture does not exist.html 7/11/2010 ."customCursor"] Category: OFP ctrlMapMouseOver control Operand types: control: Control Compatibility: Version 5501 required. To restore default texture. "Move". default cursor texture is used.92 required.arma2. Category: OFP http://www. write empty string.com/comref/full.BIS Game Engine Scripting Commands Page 83 of 415 Category: OFP PC ctrlMapAnimDone control Operand types: control: Control Compatibility: Version 2. Example: <map_control> ctrlMapCursor ["Track". Type of returned value: Boolean Description: Checks whether the map animation has finished.

Type of returned value: Array Description: Convert position in the map from world coordinates to screen coordinates.92 required.html 7/11/2010 . Type of returned value: Array Description: Convert position in the map from screen coordinates to world coordinates. Type of returned value: Number Description: Return the current scale of the map control. Type of returned value: http://www.50 required. Category: OFP PC ctrlParent control Operand types: control: Control Compatibility: Version 2. Category: OFP PC map ctrlMapScreenToWorld [x. y] Operand types: map: Control [x.com/comref/full. y]: Array Compatibility: Version 5127 required.BIS Game Engine Scripting Commands Page 84 of 415 ctrlMapScale control Operand types: control: Control Compatibility: Version 2. Category: OFP PC map ctrlMapWorldToScreen position Operand types: map: Control position: Array Compatibility: Version 5127 required.arma2.

BIS Game Engine Scripting Commands Page 85 of 415 Display Description: Returns container of given control. h] array. Type of returned value: Array Description: Returns the current position and size of control as [x.arma2.html 7/11/2010 . y. id] Operand types: control: Control [handler name. Example: _pos = ctrlPosition _control Category: OFP PC control ctrlRemoveAllEventHandlers handler name Operand types: control: Control handler name: String Compatibility: Version 5501 required. id]: Array Compatibility: http://www. Example: _control ctrlRemoveAllEventHandlers "KeyDown" Category: OFP PC control ctrlRemoveEventHandler [handler name.50 required. w.com/comref/full. Example: _display = ctrlParent _control Category: OFP PC ctrlPosition control Operand types: control: Control Compatibility: Version 2. Type of returned value: Nothing Description: Remove all even handlers from the given control.

Color is in format Color.com/comref/full. 0] Category: OFP PC ctrlScale control Operand types: control: Control Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 86 of 415 Version 5501 required. 0.arma2. Type of returned value: Nothing Description: Remove a given event handler from the given control.html 7/11/2010 . Type of returned value: Nothing Description: Sets text color of given control when control is selected. Example: _control ctrlSetActiveColor [1. 0. 1] Category: OFP PC control ctrlSetAutoScrollDelay delay Operand types: control: Control http://www. Example: _control ctrlRemoveEventHandler ["KeyDown". Example: _scale = ctrlScale _control Category: OFP PC display ctrlSetActiveColor color Operand types: display: Control color: Array Compatibility: Version 2. Type of returned value: Number Description: Returns the current scale of control.50 required.

Example: _control ctrlSetAutoScrollSpeed 5 Category: OFP PC display ctrlSetBackgroundColor color http://www. Example: _control ctrlSetAutoScrollDelay 5 Category: OFP PC control ctrlSetAutoScrollSpeed speed Operand types: control: Control speed: Number Compatibility: Version 5501 required. Type of returned value: Nothing Description: Defines if scroll should rewind when auto-scroll reach end. If speed smaller than 0.html 7/11/2010 .BIS Game Engine Scripting Commands Page 87 of 415 delay: Number Compatibility: Version 5501 required. auto-scroll is disabled. Type of returned value: Nothing Description: Sets number of second before auto-scroll starts. Type of returned value: Nothing Description: Sets number of second required to scroll to next line.com/comref/full.arma2. Example: _control ctrlSetAutoScrollDelay 5 Category: OFP PC control ctrlSetAutoScrollRewind delay Operand types: control: Control delay: Boolean Compatibility: Version 5501 required.

50 required. function] Operand types: control: Control [handler name.com/comref/full. Type of returned value: Nothing Description: Sets given event handler of given control Example: _control ctrlSetEventHandler ["KeyDown". Example: _control ctrlSetFade 1 Category: OFP PC http://www. 1] Category: OFP PC control ctrlSetEventHandler [handler name. 0. function]: Array Compatibility: Version 2.54 required. Example: _control ctrlSetBackgroundColor [1. Color is in format Color.50 required. 0.BIS Game Engine Scripting Commands Page 88 of 415 Operand types: display: Control color: Array Compatibility: Version 2. ""] Category: OFP PC control ctrlSetFade fade Operand types: control: Control fade: Number Compatibility: Version 2.html 7/11/2010 .arma2. Type of returned value: Nothing Description: Sets background color of given control. Type of returned value: Nothing Description: Sets wanted transparency for control animation.

Example: _control ctrlSetFont "TahomaB" Category: OFP PC control ctrlSetFontH1 name Operand types: control: Control name: String Compatibility: Version 2. Example: ctrlSetFocus _control Category: OFP PC control ctrlSetFont name Operand types: control: Control name: String Compatibility: Version 2. Example: _control ctrlSetFontH1 "TahomaB" Category: OFP PC http://www.html 7/11/2010 .BIS Game Engine Scripting Commands Page 89 of 415 ctrlSetFocus control Operand types: control: Control Compatibility: Version 2.92 required.arma2.50 required. Type of returned value: Nothing Description: Set the input focus on given control.50 required. Type of returned value: Nothing Description: Sets the main font of given control. Type of returned value: Nothing Description: Sets H1 font of given HTML control.com/comref/full.

html 7/11/2010 . Type of returned value: Nothing Description: Sets H1 bold font of given HTML control.50 required.50 required.50 required. Example: _control ctrlSetFontH2 "TahomaB" Category: OFP PC control ctrlSetFontH2B name Operand types: control: Control name: String Compatibility: Version 2.arma2.com/comref/full. Example: _control ctrlSetFontH2B "TahomaB" Category: OFP PC http://www. Example: _control ctrlSetFontH1B "TahomaB" Category: OFP PC control ctrlSetFontH2 name Operand types: control: Control name: String Compatibility: Version 2.BIS Game Engine Scripting Commands Page 90 of 415 control ctrlSetFontH1B name Operand types: control: Control name: String Compatibility: Version 2. Type of returned value: Nothing Description: Sets H2 font of given HTML control. Type of returned value: Nothing Description: Sets H2 bold font of given HTML control.

Example: _control ctrlSetFontH4 "TahomaB" http://www. Type of returned value: Nothing Description: Sets H4 font of given HTML control.50 required. Example: _control ctrlSetFontH3B "TahomaB" Category: OFP PC control ctrlSetFontH4 name Operand types: control: Control name: String Compatibility: Version 2.BIS Game Engine Scripting Commands Page 91 of 415 control ctrlSetFontH3 name Operand types: control: Control name: String Compatibility: Version 2. Type of returned value: Nothing Description: Sets H3 bold font of given HTML control. Type of returned value: Nothing Description: Sets H3 font of given HTML control.com/comref/full.arma2.50 required. Example: _control ctrlSetFontH3 "TahomaB" Category: OFP PC control ctrlSetFontH3B name Operand types: control: Control name: String Compatibility: Version 2.50 required.html 7/11/2010 .

BIS Game Engine Scripting Commands Page 92 of 415 Category: OFP PC control ctrlSetFontH4B name Operand types: control: Control name: String Compatibility: Version 2.com/comref/full. Type of returned value: Nothing Description: Sets H4 bold font of given HTML control. Example: _control ctrlSetFontH4B "TahomaB" Category: OFP PC control ctrlSetFontH5 name Operand types: control: Control name: String Compatibility: Version 2.arma2. http://www. Type of returned value: Nothing Description: Sets H5 font of given HTML control. Example: _control ctrlSetFontH5 "TahomaB" Category: OFP PC control ctrlSetFontH5B name Operand types: control: Control name: String Compatibility: Version 2.50 required.html 7/11/2010 .50 required.50 required. Type of returned value: Nothing Description: Sets H5 bold font of given HTML control.

Type of returned value: Nothing Description: Sets H6 bold font of given HTML control.html 7/11/2010 . Example: _control ctrlSetFontH6 "TahomaB" Category: OFP PC control ctrlSetFontH6B name Operand types: control: Control name: String Compatibility: Version 2.BIS Game Engine Scripting Commands Page 93 of 415 Example: _control ctrlSetFontH5B "TahomaB" Category: OFP PC control ctrlSetFontH6 name Operand types: control: Control name: String Compatibility: Version 2. Type of returned value: Nothing Description: Sets H5 font of given HTML control.com/comref/full.50 required. Type of returned value: Nothing http://www. Example: _control ctrlSetFontH6B "TahomaB" Category: OFP PC control ctrlSetFontHeight height Operand types: control: Control height: Number Compatibility: Version 2.arma2.50 required.50 required.

arma2.05 Category: OFP PC control ctrlSetFontHeightH2 height Operand types: control: Control height: Number Compatibility: Version 2.05 Category: OFP PC control ctrlSetFontHeightH3 height Operand types: control: Control height: Number Compatibility: http://www. Example: _control ctrlSetFontHeightH1 0.BIS Game Engine Scripting Commands Page 94 of 415 Description: Sets the main font size of given control. Type of returned value: Nothing Description: Sets H2 font size of given HTML control. Type of returned value: Nothing Description: Sets H1 font size of given HTML control. Example: _control ctrlSetFontHeightH2 0.50 required.com/comref/full. Example: _control ctrlSetFontHeight 0.html 7/11/2010 .50 required.05 Category: OFP PC control ctrlSetFontHeightH1 height Operand types: control: Control height: Number Compatibility: Version 2.

05 Category: OFP PC control ctrlSetFontHeightH4 height Operand types: control: Control height: Number Compatibility: Version 2. Example: _control ctrlSetFontHeightH3 0. Type of returned value: Nothing Description: Sets H4 font size of given HTML control.50 required.50 required.com/comref/full. Example: _control ctrlSetFontHeightH4 0. Type of returned value: Nothing Description: Sets H3 font size of given HTML control.arma2.05 Category: OFP PC control ctrlSetFontHeightH6 height Operand types: http://www.05 Category: OFP PC control ctrlSetFontHeightH5 height Operand types: control: Control height: Number Compatibility: Version 2.BIS Game Engine Scripting Commands Page 95 of 415 Version 2. Example: _control ctrlSetFontHeightH5 0.50 required. Type of returned value: Nothing Description: Sets H5 font size of given HTML control.html 7/11/2010 .

Type of returned value: Nothing Description: Sets P font of given HTML control.05 Category: OFP PC control ctrlSetFontP name Operand types: control: Control name: String Compatibility: Version 2.arma2. Type of returned value: Nothing Description: Sets H6 font size of given HTML control. Example: _control ctrlSetFontHeightP 0. Type of returned value: Nothing Description: Sets P font size of given HTML control.BIS Game Engine Scripting Commands Page 96 of 415 control: Control height: Number Compatibility: Version 2. Example: _control ctrlSetFontP "TahomaB" Category: OFP PC control ctrlSetFontP height Operand types: control: Control height: Number Compatibility: Version 2.50 required. Example: _control ctrlSetFontHeightH6 0.05 Category: OFP PC control ctrlSetFontPB name http://www.com/comref/full.50 required.html 7/11/2010 .50 required.

y. h]: Array Compatibility: Version 2. h] Operand types: control: Control [x. y. Example: _control ctrlSetFontPB "TahomaB" Category: OFP PC display ctrlSetForegroundColor color Operand types: display: Control color: Array Compatibility: Version 2. w. Example: _control ctrlSetPosition [0. w.50 required. Type of returned value: Nothing Description: Sets background color of given control. 0. Type of returned value: Nothing Description: Sets wanted position and size for control animation. Type of returned value: Nothing Description: Sets P bold font of given HTML control.5] Category: OFP PC http://www.50 required.BIS Game Engine Scripting Commands Page 97 of 415 Operand types: control: Control name: String Compatibility: Version 2.5. Color is in format Color. Example: _control ctrlSetForegroundColor [1. 0.html 7/11/2010 . Width and height are optional. 0.50 required. 1] Category: OFP PC control ctrlSetPosition [x.com/comref/full.arma2.

text] Operand types: [idc. Type of returned value: Nothing Description: Set the structured text which will be displayed in structured text control.50 required.paa/&gt. text]: Array Compatibility: Version 1. buttons. Example: _control ctrlSetStructuredText parseText "First line&lt.Second line" Category: OFP PC ctrlSetText [idc. Type of returned value: Nothing Description: Sets wanted scale for control animation.html 7/11/2010 .arma2. Example: _control ctrlScale 0. Example: ctrlSetText [100.BIS Game Engine Scripting Commands Page 98 of 415 control ctrlSetScale scale Operand types: control: Control scale: Number Compatibility: Version 5501 required. "Hello. Type of returned value: Nothing Description: Sets the text that will be shown in the control with id idc of the topmost user dialog.img image=data\isniper. Top left corner remains same. edit lines and active texts.5 Category: OFP PC control ctrlSetStructuredText structured text Operand types: control: Control structured text: Structured text Compatibility: Version 2. This can be used for static texts. world"] Category: Resistance http://www.53 required.&ltbr/&gt.com/comref/full.

50 required. Type of returned value: Nothing Description: Sets text color of given control.com/comref/full. 0. 1] Category: OFP PC display ctrlSetTooltip text Operand types: display: Control text: String Compatibility: Version 2. Example: _control ctrlSetTextColor [1. Color is in format Color. world.92 required.50 required." Category: OFP PC display ctrlSetTextColor color Operand types: display: Control color: Array Compatibility: Version 2. Type of returned value: Nothing Description: Sets tooltip text of given control. Example: _control ctrlSetTooltip "tooltip" http://www.html 7/11/2010 . 0. Type of returned value: Nothing Description: Sets the text that will be shown in given control.BIS Game Engine Scripting Commands Page 99 of 415 control ctrlSetText text Operand types: control: Control text: String Compatibility: Version 2. Example: _control ctrlSetText "Hello.arma2.

Type of returned value: Nothing Description: Sets tooltip text color of given control.BIS Game Engine Scripting Commands Page 100 of 415 Category: OFP PC display ctrlSetTooltipColorBox color Operand types: display: Control color: Array Compatibility: Version 2. http://www.arma2. 0. 0. Type of returned value: Nothing Description: Sets tooltip background color of given control. 0. Color is in format Color. 0. Color is in format Color. Example: _control ctrlSetTooltipColorBox [1. 1] Category: OFP PC display ctrlSetTooltipColorShade color Operand types: display: Control color: Array Compatibility: Version 2.com/comref/full. Color is in format Color. Example: _control ctrlSetTooltipColorShade [1. Type of returned value: Nothing Description: Sets tooltip border color of given control.92 required.92 required. 1] Category: OFP PC display ctrlSetTooltipColorText color Operand types: display: Control color: Array Compatibility: Version 2.html 7/11/2010 .92 required.

Example: _control ctrlShow false Category: OFP PC ctrlShown control Operand types: control: Control Compatibility: Version 2. Type of returned value: Nothing Description: Show / hide given control.arma2. 0. http://www. show]: Array Compatibility: Version 1. true] Category: Resistance control ctrlShow show Operand types: control: Control show: Boolean Compatibility: Version 2.BIS Game Engine Scripting Commands Page 101 of 415 Example: _control ctrlSetTooltipColorText [1. show] Operand types: [idc. Type of returned value: Boolean Description: Returns whether given control is shown. Example: ctrlShow [100.html 7/11/2010 .50 required.50 required.50 required.com/comref/full. Type of returned value: Nothing Description: Shows / hides the control with id idc of the topmost user dialog. 1] Category: OFP PC ctrlShow [idc. 0.

Type of returned value: Number Description: http://www. Example: _text = ctrlText _control Category: OFP PC ctrlText idc Operand types: idc: Number Compatibility: Version 1. Example: _message = ctrlText 100 Category: Resistance ctrlType control Operand types: control: Control Compatibility: Version 2.com/comref/full. This can be used for static texts.html 7/11/2010 .50 required.arma2.BIS Game Engine Scripting Commands Page 102 of 415 Example: _ok = ctrlShown _control Category: OFP PC ctrlText control Operand types: control: Control Compatibility: Version 2. Type of returned value: String Description: Returns the text shown in the control with id idc of the topmost user dialog. Type of returned value: String Description: Returns the text shown in given control. buttons.56 required. edit lines and active texts.50 required.

Category: OFP http://www.BIS Game Engine Scripting Commands Page 103 of 415 Returns value representing type of control. Type of returned value: String Description: Return the name of the type of the currently using magazine (on the primary turret for vehicles). Type of returned value: String Description: Return the current command type (empty string when no command). Example: _visible = ctrlVisible 100 Category: Resistance currentCommand vehicle Operand types: vehicle: Object Compatibility: Version 2.arma2. Category: OFP currentMagazine vehicle Operand types: vehicle: Object Compatibility: Version 5500 required. Example: _type = ctrlType _control Category: OFP PC ctrlVisible idc Operand types: idc: Number Compatibility: Version 1.50 required.92 required.html 7/11/2010 .com/comref/full. Type of returned value: Boolean Description: Returns whether the control with id idc of the topmost user dialog is visible.

Type of returned value: Number Description: Return the index of the current waypoint. Category: OFP currentWeapon vehicle Operand types: vehicle: Object Compatibility: Version 5500 required.html 7/11/2010 .arma2.BIS Game Engine Scripting Commands Page 104 of 415 currentTask person Operand types: person: Object Compatibility: Version 5501 required. Category: Identity currentWaypoint group Operand types: group: Group Compatibility: Version 5500 required. Type of returned value: Task Description: Return current task of given person.com/comref/full. Type of returned value: http://www. Category: Identity currentTasks teamMember Operand types: teamMember: Compatibility: Version 2. Type of returned value: Array Description: List all uncompleted tasks.91 required.

speed] or ["name". If speed is not given. The object can be defined in the description.arma2."type". it's assumed to be one."type"]. Example: 0 cutFadeIn 1. Example: http://www.ext file. Example: alive cursorTarget Category: OFP layer cutFadeOut duration Operand types: layer: Number duration: Number Compatibility: Version 5126 required. Category: OFP cursorTarget Compatibility: Version 5500 required. Type of returned value: Object Description: This is the entity pointed to by a players cursor. Type of returned value: Nothing Description: Terminate the effect in the given layer and set duration of the fade out phase to the given time.0 Category: OFP cutObj effect Operand types: effect: Array Type of returned value: Nothing Description: Object background .html 7/11/2010 .BIS Game Engine Scripting Commands Page 105 of 415 String Description: Return the name of the currently selected weapon (on the primary turret for vehicles).the argument uses format ["name".com/comref/full.

it's assumed to be one."type"].com/comref/full.ext file.speed] or ["name"."type". Example: cutRsc ["binocular". Example: 0 cutObj ["TVSet". The resource can be defined in the description.speed] or ["name"."type".arma2. "plain"] Category: OFP layer cutObj effect Operand types: layer: Number effect: Array Compatibility: Version 5126 required. If speed is not given."type"].ext file. "plain"] Category: OFP cutRsc effect Operand types: effect: Array Type of returned value: Nothing Description: Resource background . Type of returned value: Nothing Description: http://www. The left argument define layer in which the effect is show. Type of returned value: Nothing Description: Object background . The object can be defined in the description. 0 is the back most.html 7/11/2010 . it's assumed to be one.the argument uses format ["name".the right argument uses format ["name". If speed is not given.BIS Game Engine Scripting Commands Page 106 of 415 cutObj ["TVSet". "PLAIN"] Category: OFP layer cutRsc effect Operand types: layer: Number effect: Array Compatibility: Version 5126 required.

BIS Game Engine Scripting Commands

Page 107 of 415

Resource background - the right argument uses format ["name","type",speed] or ["name","type"]. If speed is not given, it's assumed to be one. The left argument define layer in which the effect is show, 0 is the back most. The resource can be defined in the description.ext file. Example: 0 cutRsc ["binocular", "PLAIN"] Category: OFP

cutText effect
Operand types: effect: Array Type of returned value: Nothing Description: Text background - the argument uses format ["text","type",speed] or ["text","type"]. If speed is not given, it's assumed to be one. Type may be one of: "PLAIN", "PLAIN DOWN", "BLACK", "BLACK FADED", "BLACK OUT", "BLACK IN", "WHITE OUT" or "WHITE IN". Example: cutText ["", "BLACK OUT"] Category: OFP

layer cutText effect
Operand types: layer: Number effect: Array Compatibility: Version 5126 required. Type of returned value: Nothing Description: Text background - the right argument uses format ["text","type",speed] or ["text","type"]. If speed is not given, it's assumed to be one. Type may be one of: "PLAIN", "PLAIN DOWN", "BLACK", "BLACK FADED", "BLACK OUT", "BLACK IN", "WHITE OUT" or "WHITE IN". The left argument define layer in which the effect is show, 0 is the back most. Example: 0 cutText ["", "BLACK OUT"] Category: OFP

damage object
Operand types:

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 108 of 415

object: Object Compatibility: Version 1.50 required. Type of returned value: Number Description: Returns the object damage in a range of 0 to 1. Note: this function is identical to getDammage. Example: damage player Category: OFP

date
Compatibility: Version 2.92 required. Type of returned value: Array Description: Return the actual mission date and time as an array [year, month, day, hour, minute]. Category: OFP

DateToNumber date
Operand types: date: Array Compatibility: Version 5501 required. Type of returned value: Number Description: Convert date to float number. Example: time = DateToNumber [year,month,day,hour,minute] Category: OFP

dayTime
Type of returned value: Number Description: Returns the time in the world, in hours. Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 109 of 415

debugLog anything
Operand types: anything: Any Type of returned value: Nothing Description: Dumps the argument's type and value to the debugging output. Example: debugLog player Category: OFP

default a
Operand types: a: Code Type of returned value: Nothing Description: see switch Category: Default

deg x
Operand types: x: Number Type of returned value: Number Description: Converts x from radians to degrees. Example: deg 1 , result is 57.295 Category: Default

deleteCenter side
Operand types: side: Side Compatibility: Version 1.86 required. Type of returned value:

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 110 of 415

Nothing Description: Destroys the AI center of the given side. Example: deleteCenter East Category: OFP

deleteCollection object
Operand types: object: Object Compatibility: Version 2.90 required. Type of returned value: Nothing Description: Delete a collection. Category: OFP

map deleteEditorObject object
Operand types: map: Control object: String Compatibility: Version 2.92 required. Type of returned value: Any Description: Delete the editor object. Requires all editor object links to be removed prior. Category: Editor

deleteGroup group
Operand types: group: Group Type of returned value: Nothing Description: Destroys the given AI group. Example: deleteGroup group

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 111 of 415

Category: OFP

deleteIdentity identityName
Operand types: identityName: String Compatibility: Version 1.75 required. Type of returned value: Boolean Description: Deletes an identity created by saveIdentity from the campaign progress file. Example: deleteIdentity "playerIdentity" Category: Resistance

deleteLocation location
Operand types: location: Location Compatibility: Version 2.90 required. Type of returned value: Nothing Description: Delete the given location. Category: Location

deleteMarker name
Operand types: name: String Type of returned value: Nothing Description: Destroys the given marker. The marker is destroyed on all computers in a network session. Example: deleteMarker "Marker1" Category: OFP

deleteMarkerLocal name

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 112 of 415

Operand types: name: String Compatibility: Version 2.92 required. Type of returned value: Nothing Description: Destroys the given marker. The marker is only destroyed on the computer where the command is called. Example: deleteMarkerLocal "Marker1" Category: OFP

deleteStatus statusName
Operand types: statusName: String Compatibility: Version 1.75 required. Type of returned value: Boolean Description: Deletes a status created by saveStatus from the campaign progress file. Example: deleteStatus "playerState" Category: Resistance

deleteVehicle object
Operand types: object: Object Compatibility: Version 1.34 required. Type of returned value: Nothing Description: Deletes any unit or vehicle. Only vehicles inserted in the editor or created during a mission can be deleted. The player unit cannot be deleted. Example: deleteVehicle tank Category: OFP

deleteWaypoint waypoint

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 113 of 415

Operand types: waypoint: Array Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Removes the waypoint. Example: deleteWaypoint [grp, 2] Category: OFP

detach obj
Operand types: obj: Object Compatibility: Version 5501 required. Type of returned value: Nothing Description: Detaches an object. Example: detach player Category: OFP

diag_fps
Compatibility: Version 5500 required. Type of returned value: Number Description: Returns average framerate over last 16 frames. Category: OFP

diag_fpsmin
Compatibility: Version 5500 required. Type of returned value: Number Description:

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 114 of 415

Returns minimal framerate. Calculated from the longest frame over last 16 frames. Category: OFP

diag_frameno
Compatibility: Version 5500 required. Type of returned value: Number Description: Returns number of frame currently displayed . Category: OFP

diag_log anything
Operand types: anything: Any Compatibility: Version 5501 required. Type of returned value: Nothing Description: Dumps the argument's type and value to the report file. Example: diag_log player Category: OFP

diag_tickTime
Compatibility: Version 5501 required. Type of returned value: Number Description: Real time spent from the start of the game. Category: OFP

dialog
Compatibility: Version 1.78 required.

http://www.arma2.com/comref/full.html

7/11/2010

Category: Resistance person diarySubjectExists name Operand types: person: Object name: String Compatibility: Version 5501 required. For possible values of flag.html 7/11/2010 .BIS Game Engine Scripting Commands Page 115 of 415 Type of returned value: Boolean Description: Returns whether a user dialog is present.50 required.com/comref/full. Type of returned value: Boolean Description: Check if given difficulty setting is currently enabled. Category: OFP direction object Operand types: object: Object Compatibility: Version 1. Type of returned value: Boolean Description: Checks whether given subject is present in the diary of given person. Category: Identity difficultyEnabled flag Operand types: flag: String Compatibility: Version 5127 required. Example: direction player http://www.arma2. see config class Flags in CfgDificulties. Type of returned value: Number Description: Returns the object heading in the range of 0 to 360.

Type of returned value: Number Description: Return direction (angle) of given location. Example: soldierOne disableAI "Move" http://www. Example: soldierOne directSay "messageOne" Category: OFP unit disableAI section Operand types: unit: Object section: String Type of returned value: Nothing Description: Disables parts of the AI behaviour to get more control over a unit.com/comref/full.90 required. Type of returned value: Nothing Description: Sends the message to the direct channel. "AUTOTARGET" (disables independed target assigning and watching of unknown targets) or "MOVE" (disables movement). Section is one of "TARGET" (disables watching assigned targets).ext file or radio protocol.arma2.BIS Game Engine Scripting Commands Page 116 of 415 Category: OFP direction location Operand types: location: Location Compatibility: Version 2.html 7/11/2010 . The message is defined in the description. Category: Location unit directSay radioName Operand types: unit: Object radioName: String Compatibility: Version 5501 required.

Implemented by the counter. Example: player disableConversation true Category: OFP disableSerialization Compatibility: Version 5501 required.unlock need to be matched.arma2. This is normally used only in cutscenes to disable the player's controls.com/comref/full.BIS Game Engine Scripting Commands Page 117 of 415 Category: OFP unit disableConversation lock Operand types: unit: Object lock: Boolean Type of returned value: Nothing Description: Lock / unlock the unit to using conversation. script can work with the data types which do not support serialization (UI types). Category: OFP display displayAddEventHandler [handler name. Category: Default disableUserInput disable Operand types: disable: Boolean Type of returned value: Nothing Description: Disables all user input. function] Operand types: display: Display http://www. so lock .html 7/11/2010 . After this. Type of returned value: Nothing Description: Disable saving of script containing this command.

50 required. Type of returned value: Display Description: A non-existing display.html 7/11/2010 .BIS Game Engine Scripting Commands Page 118 of 415 [handler name. ""] Category: OFP PC display displayCtrl idc Operand types: display: Display idc: Number Compatibility: Version 2. including itself. Type of returned value: Control Description: Return child control with specified idc. function]: Array Compatibility: Version 5501 required. Example: _control = _display displayCtrl 101 Category: OFP PC displayNull Compatibility: Version 2. This value is not equal to anything. Type of returned value: Number Description: Add an event handler to the given display.arma2. Example: _id = _display displayAddEventHandler ["KeyDown". http://www. Returns id of the handler or -1 when failed.com/comref/full.92 required. Category: OFP PC display displayRemoveAllEventHandlers handler name Operand types: display: Display handler name: String Compatibility: Version 5501 required.

""] Category: OFP PC dissolveTeam team Operand types: team: String http://www. Example: _control displaySetEventHandler ["KeyDown". Type of returned value: Nothing Description: Remove a given event handler from the given display. Example: _display displayRemoveAllEventHandlers "KeyDown" Category: OFP PC display displayRemoveEventHandler [handler name.com/comref/full. function] Operand types: display: Display [handler name. Example: _display displayRemoveEventHandler ["KeyDown". 0] Category: OFP PC display displaySetEventHandler [handler name. id]: Array Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 119 of 415 Type of returned value: Nothing Description: Remove all even handlers from the given display.arma2. function]: Array Compatibility: Version 2.html 7/11/2010 .54 required. id] Operand types: display: Display [handler name. Type of returned value: Nothing Description: Sets given event handler of given display.

arma2.html 7/11/2010 . Type of returned value: Number http://www. Example: dissolveTeam "RED" Category: OFP obj1 or pos1 distance obj2 or pos2 Operand types: obj1 or pos1: Object or Array obj2 or pos2: Object or Array Type of returned value: Number Description: Computes the distance between two objects or positions. Example: player distance leader player Category: OFP location1 or pos1 distance location2 or pos2 Operand types: location1 or pos1: location2 or pos2: Compatibility: Version 5501 required. All members become members of the main team. "GREEN".BIS Game Engine Scripting Commands Page 120 of 415 Compatibility: Version 2. Type of returned value: Nothing Description: Dissolves the given team.05 required. Possible team values are: "RED".com/comref/full. "BLUE" or "YELLOW". Type of returned value: Number Description: Computes the distance between two locations or positions. Category: Location distributionRegion Compatibility: Version 5129 required.

Example: with missionNamespace do {global=global+1} Category: Default forCommand do code Operand types: forCommand: for type code: Code Type of returned value: Any Description: End of for command..} Category: Default while do code Operand types: while: While Type code: Code Compatibility: Version 1.code. Type of returned value: Nothing Description: Execute the code inside the given namespace.com/comref/full..85 required. Note: the maximum repeat count for the loop is http://www.html 7/11/2010 .arma2. Type of returned value: Nothing Description: Repeats the code while the condition is true.BIS Game Engine Scripting Commands Page 121 of 415 Description: Return the region where the game was sold (based on distribution id). Category: OFP with do code Operand types: with: With Type code: Code Compatibility: Version 5501 required. starts cycle Example: for "_x" from 20 to 10 step -2 do {.

http://www. If the condition is still true after the loop was repeated 10000 times. default {block}. case 2 : {block}.com/comref/full. the loop will be terminated and an error message is shown.BIS Game Engine Scripting Commands Page 122 of 415 10000. Example: soldierOne doFire objNull Category: OFP unit doFollow position Operand types: unit: Object or Array position: Object Type of returned value: Nothing Description: Orders a unit to follow the given unit (silently).arma2.} Category: Default unit doFire target Operand types: unit: Object or Array target: Object Type of returned value: Nothing Description: Orders a unit to commence firing on the given target (silently). the unit is ordered to commence firing on its current target (set using doTarget or commandTarget). If the target is objNull. Example: while "a>b" do {a=a+1} Category: Default switch do block Operand types: switch: Switch Type block: Code Type of returned value: Any Description: Switch form Example: switch (_a) do { case 1: {block}.html 7/11/2010 .

position player.BIS Game Engine Scripting Commands Page 123 of 415 Example: soldierOne doFollow player Category: OFP unit(s) doFSM [fsm name.arma2. http://www.53 required. Example: doGetOut unitOne Category: OFP unit doMove position Operand types: unit: Object or Array position: Array Type of returned value: Nothing Description: Orders the unit to move to the given position (format Position) (silently).com/comref/full. Type of returned value: Nothing Description: Orders a unit to process command defined by FSM file (silently). target] Operand types: unit(s): Object or Array [fsm name. position. Example: soldierOne doFSM ["move. position.html 7/11/2010 .fsm". Type of returned value: Nothing Description: Orders a unit to get out from the vehicle (silently). player] Category: OFP PC doGetOut unit Operand types: unit: Object or Array Compatibility: Version 2.28 required. target]: Array Compatibility: Version 2.

html 7/11/2010 .com/comref/full. Example: doStop unitOne Category: OFP unit doTarget position Operand types: unit: Object or Array position: Object Type of returned value: Nothing Description: Orders the unit to target the given target (silently).BIS Game Engine Scripting Commands Page 124 of 415 Example: soldierOne doMove getMarkerPos "MarkerMoveOne" Category: OFP doStop unit Operand types: unit: Object or Array Type of returned value: Nothing Description: Orders the unit to stop (silently). Note: the stop command is never finished. Example: soldierOne doTarget player Category: OFP unit doWatch position Operand types: unit: Object or Array position: Array Type of returned value: Nothing Description: Orders the unit to watch the given position (format Position) (silently). Example: soldierOne doWatch getMarkerPos "MarkerMoveOne" http://www.arma2. the unit will never be ready.

Category: OFP PC http://www. b.35 required. position2. a. Type of returned value: Nothing Description: Draw arrow in map. Category: OFP PC map drawEllipse [center. color] Operand types: map: Control [position1. a. Example: soldierOne doWatch player Category: OFP map drawArrow [position1. fill] Operand types: map: Control [center.arma2. Type of returned value: Nothing Description: Draw ellipse in map. b. color]: Array Compatibility: Version 2. color. angle.35 required.BIS Game Engine Scripting Commands Page 125 of 415 Category: OFP unit doWatch target Operand types: unit: Object or Array target: Object Type of returned value: Nothing Description: Orders the unit to watch the given target (silently). fill]: Array Compatibility: Version 2.html 7/11/2010 . angle. color.com/comref/full. position2.

line type. Type of returned value: Nothing Description: The editor will draw a line between the two specified editor objects. Type of returned value: Nothing Description: Draw line in map. color] Operand types: map: Control [position1. position.BIS Game Engine Scripting Commands Page 126 of 415 map drawIcon [texture.html 7/11/2010 . position2. to. Type of returned value: Nothing Description: Draw icon in map. to. color]: Array Compatibility: Version 2.35 required. width. angle. height. color] Operand types: map: Control [from. param type.92 required.com/comref/full. color. shadow] Operand types: map: Control [texture. Category: Editor map drawLocation location Operand types: map: Control location: Location http://www. angle. width. text. Category: OFP PC map drawLine [position1. height. text. shadow]: Array Compatibility: Version 2. position2. line type.35 required. color. param type. Category: OFP PC map drawLink [from. position.arma2. color]: Array Compatibility: Version 2. Line type can be LINE or ARROW.

90 required. a.BIS Game Engine Scripting Commands Page 127 of 415 Compatibility: Version 2. fill] Operand types: map: Control [center.35 required.arma2. Type of returned value: Nothing Description: Drops a particle into the scene. Type of returned value: Nothing Description: Draw location in the map. Array is in format ParticleArray. a. Example: driver vehicle player Category: OFP drop array Operand types: array: Array Compatibility: Version 1. Type of returned value: Nothing Description: Draw rectangle in map. If the vehicle is not a vehicle. fill]: Array Compatibility: Version 2. the person is returned instead. angle. angle. Category: OFP PC driver vehicle Operand types: vehicle: Object Type of returned value: Object Description: Returns the driver of the vehicle. but a person.50 required. Category: Location PC map drawRectangle [center. color.html 7/11/2010 .com/comref/full. b. http://www. color. b.

Category: Editor map editorSetEventHandler [handler name.arma2.BIS Game Engine Scripting Commands Page 128 of 415 Category: Resistance east Type of returned value: Side Description: The East side.html 7/11/2010 . Type of returned value: Any Description: Show the edit object dialog for the given object.com/comref/full. Type of returned value: Nothing Description: Sends any text into the debugger console or the logfile. Category: OFP echo text Operand types: text: String Compatibility: Version 2. Example: echo "Text in logfile" Category: Default map editObject object Operand types: map: Control object: String Compatibility: Version 2.00 required.92 required. function] Operand types: map: Control http://www.

Category: OFP ifCode else elseCode Operand types: ifCode: Code elseCode: Code Compatibility: Version 1.BIS Game Engine Scripting Commands Page 129 of 415 [handler name.com/comref/full. Type of returned value: Nothing Description: Sets given event handler of given editor.92 required. Type of returned value: Object Description: Returns the effective commander (who really commands) of the vehicle.92 required. Type of returned value: Array Description: Constructs an array that can be processed by then.arma2. Example: _map editorSetEventHandler ["SelectObject". Example: if (a>b) then {c=0} else {c=1} Category: Default vehicle emptyPositions position Operand types: vehicle: Object position: String http://www. ""] Category: Editor effectiveCommander vehicle Operand types: vehicle: Object Compatibility: Version 2.html 7/11/2010 .85 required. function]: Array Compatibility: Version 2.

BIS Game Engine Scripting Commands Page 130 of 415 Compatibility: Version 2.arma2. Type of returned value: Number Description: Returns the number of available cargo. driver. "AUTOTARGET" (enables independed target assigning and watching of unknown targets) or "MOVE" (enables movement).com/comref/full.92 required. Type of returned value: Nothing Description: Set if leader can issue attack commands. Section is one of "TARGET" (enables watching assigned targets).92 required. Type of returned value: Nothing Description: Enables parts of the AI behaviour.53 required. gunner or commander positions in the vehicle.html 7/11/2010 . Category: OFP enableEndDialog Type of returned value: http://www. Example: _freePositions = (vehicle player) freePositions "cargo" Category: OFP unit enableAI section Operand types: unit: Object section: String Compatibility: Version 2. Example: soldierOne enableAI "Move" Category: OFP group enableAttack enable Operand types: group: Object or Group enable: Boolean Compatibility: Version 2.

html 7/11/2010 . Type of returned value: Nothing Description: Enable / disable reload right after magazine is empty. Example: _vehicle enableReload false http://www.BIS Game Engine Scripting Commands Page 131 of 415 Nothing Description: Enables the dialog buttons to be shown during the OnPlayerKilled script.92 required. Example: enableEnvironment false Category: OFP enableRadio enable Operand types: enable: Boolean Type of returned value: Nothing Description: Enables radio transmissions to be heard and seen on screen. Type of returned value: Nothing Description: Enable/disable environmental effects (ambient life + sound).92 required. Category: OFP object enableReload enable Operand types: object: Object enable: Boolean Compatibility: Version 2. Category: OFP enableEnvironment enabled Operand types: enabled: Boolean Compatibility: Version 2.arma2.com/comref/full.

html 7/11/2010 .92 required. http://www. When disabled. Category: OFP entity enableSimulation enable Operand types: entity: Object enable: Boolean Type of returned value: Nothing Description: Enable / disable simulation for given entity. Category: OFP enableTeamSwitch enable Operand types: enable: Boolean Compatibility: Version 2.com/comref/full.arma2. Category: OFP enableSentences enable Operand types: enable: Boolean Type of returned value: Nothing Description: Enables radio transmissions to be heard and seen on screen. save]: Compatibility: Version 5501 required. It does not affect KBTell conversations. Type of returned value: Nothing Description: Enable / disable saving of the game.BIS Game Engine Scripting Commands Page 132 of 415 Category: OFP enableSaving enable or [enable. save] Operand types: enable or [enable. the autosave is created (if not forbidden by save == false).

BIS Game Engine Scripting Commands Page 133 of 415 Type of returned value: Nothing Description: Enable / disable team switch. Type of returned value: Nothing Description: Finish loading screen displaying (started by startLoadingScreen). "END5".arma2. Example: vehicle player engineOn false Category: OFP http://www. "LOSER". "KILLED". "END4". The end type can be "CONTINUE". Category: OFP vehicle engineOn on Operand types: vehicle: Object on: Boolean Compatibility: Version 1. Type of returned value: Nothing Description: Finish the mission.90 required. "END2". Category: OFP endMission end type Operand types: end type: String Compatibility: Version 5501 required. "END3".html 7/11/2010 . Category: OFP endLoadingScreen Compatibility: Version 5501 required.com/comref/full. or "END6". Type of returned value: Nothing Description: Switches the vehicle's engine on (true) or off (false). "END1".

argument] Operand types: map: Control [object.35 required. Type of returned value: Nothing Description: Returns the estimated time left in the game.BIS Game Engine Scripting Commands Page 134 of 415 estimatedEndServerTime Compatibility: Version 5501 required. Type of returned value: Any Description: Return object argument in mission editor. Using this function the designer can provide a "time left" estimate that is shown in the "Game in progress" screen or in the master browser.34 required.html 7/11/2010 . Type of returned value: Number Description: Estimated end of MP game converted to serverTime.arma2. Example: estimatedTimeLeft Param1 Category: OFP map evalObjectArgument [object. argument]: Array Compatibility: Version 2.sqs file. Category: Editor argument exec script Operand types: http://www. For missions with a hard set limit adjusted via Param1. the following example can be used in the init.com/comref/full. Category: OFP estimatedTimeLeft timeLeft Operand types: timeLeft: Number Compatibility: Version 1.

jeepOne] exec "getIn. Type of returned value: Number Description: Execute the scripted FSM. Example: [player. Type of returned value: Any Description: Execute an editor script for the specified object. Return the FSM handler or 0 when failed. Argument is passed to the script as local variable _this. then in the campaign scripts folder and finally in the global scripts folder. Example: _map execEditorScript ["_team_1". The FSM file is first searched in the mission folder.arma2.fsm" Category: OFP http://www. Example: execFSM "test.com/comref/full.BIS Game Engine Scripting Commands Page 135 of 415 argument: Any script: String Type of returned value: Nothing Description: Executes a script. The script is first searched in the mission folder. then in the campaign scripts subfolder and finally in the global scripts folder.sqs" Category: OFP map execEditorScript [object. script] Operand types: map: Control [object.92 required. script]: Array Compatibility: Version 2.html 7/11/2010 . "create"] Category: Editor execFSM filename Operand types: filename: String Compatibility: Version 5500 required.

60 required. Example: execVM "test. Type of returned value: Script Description: Compile and execute function (sqf). Type of returned value: Script Description: Compile and execute function (sqf).html 7/11/2010 .arma2. Argument is passed to the script as local variable _this.58 required.fsm" Category: OFP execVM filename Operand types: filename: String Compatibility: Version 2. Argument is passed to the FSM as local variable _this. The FSM file is first searched in the mission folder.BIS Game Engine Scripting Commands Page 136 of 415 argument execFSM filename Operand types: argument: Any filename: String Compatibility: Version 5500 required.com/comref/full. then in the campaign scripts folder and finally in the global scripts folder. Example: http://www. then in the campaign scripts folder and finally in the global scripts folder. then in the campaign scripts folder and finally in the global scripts folder. Type of returned value: Number Description: Execute the scripted FSM.sqf" Category: OFP PC argument execVM filename Operand types: argument: Any filename: String Compatibility: Version 2. The function is first searched in the mission folder. Example: player execFSM "test. Return the FSM handler or 0 when failed. The function is first searched in the mission folder.

outputs message and terminates code in current level with value of _x Category: Default exp x Operand types: x: Number Type of returned value: Number Description: The exponential value of x. Category: OFP if exitWith code Operand types: if: If Type code: Code Compatibility: Version 2 required.com/comref/full.7182 Category: Default expectedDestination person http://www. evaluates code.sqf" Category: OFP PC exit Type of returned value: Nothing Description: Exits the script._x} . Type of returned value: Any Description: if result of condition is true. and current block with result of code Example: if (_x>5) exitWith {echo "_x is too big". Example: exp 1 .html 7/11/2010 .arma2. result is 2.BIS Game Engine Scripting Commands Page 137 of 415 player execVM "test. result is [when _x is greater then 5.

returns empty string.arma2.92 required.html 7/11/2010 . The default music volume is 0. Category: OFP faction unit Operand types: unit: Object Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 138 of 415 Operand types: person: Object Compatibility: Version 2. If faction is not defined. Type of returned value: String Description: Gets unit faction. the target volume by volume. planningMode. Example: 5 fadeMusic 0 Category: OFP time fadeRadio volume Operand types: time: Number volume: Number Type of returned value: Nothing Description: http://www. forceReplan].com/comref/full. Type of returned value: Array Description: Return expected destination of unit as a [position. The change duration is given by time. Category: OFP time fadeMusic volume Operand types: time: Number volume: Number Type of returned value: Nothing Description: Causes a smooth change in the music volume.5.

The default radio volume is 1. Example: 5 fadeRadio 0. "END4". or "END6". Mission saves will not be deleted.1 Category: OFP time fadeSound volume Operand types: time: Number volume: Number Type of returned value: Nothing Description: Causes a smooth change in the master volume.0.BIS Game Engine Scripting Commands Page 139 of 415 Causes a smooth change in the radio volume. Category: OFP false Type of returned value: Boolean Description: Always false.arma2. The change duration is given by time. Example: 5 fadeSound 0. "END1". Category: Default http://www. Type of returned value: Nothing Description: Finish the mission. the target volume by volume.com/comref/full. "END3".html 7/11/2010 . The default master volume is 1. The change duration is given by time. "END2". The end type can be "CONTINUE". the target volume by volume. "LOSER".0. "END5".1 Category: OFP failMission end type Operand types: end type: String Compatibility: Version 5501 required. "KILLED".

hidePosition. 2] find 1 .92 required.com/comref/full. ignoreObject]: Array Compatibility: Version 2. minDist. hidePosition. 1.html 7/11/2010 . visibilityPosition.92 required. visibilityPosition.arma2. returns -1 if not found. result is 1 Category: Default object findCover [position. Type of returned value: Nothing Description: Adds magazines from the campaign pool to the person (depending on the weapons the person has). minDist. Type of returned value: Object Description: Returns the object where the object should search for cover. visibilityPosition and ignoreObject parameters are optional. ignoreObject] Operand types: object: Object [position. ignoreObject is an object that is ignored in visibility check.75 required.BIS Game Engine Scripting Commands Page 140 of 415 fillWeaponsFromPool person Operand types: person: Object Compatibility: Version 1. Category: OFP http://www. maxDist. The minDist. maxDist. visibilityPosition is used to select cover that can see a certain position. Example: fillWeaponsFromPool victor Category: Resistance array find x Operand types: array: Array x: Any Compatibility: Version 2. Type of returned value: Number Description: Returns the position of the first array element that matches x. Example: [0.

Type of returned value: String Description: Return object that matches the provided reference. maxDistance.92 required. Category: Editor center findEmptyPosition [radius. Type of returned value: String Description: Return object of given type with given arguments. Category: Editor map findEditorObject [type. Type of returned value: Display Description: Find display by its IDD. value1...]: Array Compatibility: Version 2. value1. name1. maxDistance] or [radius..com/comref/full.html 7/11/2010 .. vehicleType] http://www. name1.54 required.35 required.BIS Game Engine Scripting Commands Page 141 of 415 findDisplay idd Operand types: idd: Number Compatibility: Version 2. game value] to search by object reference of a specific editor object type. Use [type. Example: _display = findDisplay 1 Category: OFP PC map findEditorObject value Operand types: map: Control value: Any Compatibility: Version 2. . .] Operand types: map: Control [type.arma2.

Type of returned value: Nothing Description: http://www. maxDistance] or [radius. Type of returned value: Array Description: Check if findEmptyPosition can be called without waiting for files.92 required.html 7/11/2010 . Category: OFP center findEmptyPositionReady [radius. maxDistance] Operand types: center: Array [radius. with the free area (vehicle of the given type can be placed anywhere) of the given radius. maxDistance. When not found. maxDistance]: Array Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 142 of 415 Operand types: center: Array [radius. empty array is returned. Category: OFP object findNearestEnemy position Operand types: object: Object position: Object or Array Compatibility: Version 2.com/comref/full. Type of returned value: Object Description: Find the nearest enemy from the specified position.arma2. Type of returned value: Array Description: Search for the position nearest (up to maxDistance) to the center.33 required. Category: OFP finishMissionInit Compatibility: Version 2. vehicleType]: Array Compatibility: Version 5501 required.

result is false Category: Default unit fire weaponName Operand types: unit: Object weaponName: String Type of returned value: Nothing Description: The unit will fire from the given weapon. Example: soldierOne fire ["throw"."SmokeShell". Category: OFP finite x Operand types: x: Number Type of returned value: Boolean Description: True. if number is finite (not infinite and valid number) Example: finite 10/0 ."SmokeShell"] Category: OFP http://www. mode.html 7/11/2010 . The array has format [muzzle. magazine] or [muzzle.arma2.com/comref/full. Example: soldierOne fire "HandGrenade" Category: OFP unit fire array Operand types: unit: Object array: Array Type of returned value: Nothing Description: The unit will fire from the given weapon.BIS Game Engine Scripting Commands Page 143 of 415 Finish world initialization before mission is launched. mode].

BIS Game Engine Scripting Commands Page 144 of 415 flag unit Operand types: unit: Object Type of returned value: Object Description: If the unit has a flag. When used on anything else.html 7/11/2010 .arma2. A dead or empty unit returns false. Example: fleeing player Category: OFP floor x Operand types: http://www. objNull is returned. this flag is returned. the returned value is the person that has this flag. Example: flagowner flagOne Category: OFP fleeing unit Operand types: unit: Object Type of returned value: Boolean Description: Checks whether the unit is fleeing. If not.com/comref/full. objNull is returned. Example: flag player Category: OFP flagOwner flag Operand types: flag: Object Type of returned value: Object Description: When used on a flag.

result is 5 Category: Default helicopter flyInHeight height Operand types: helicopter: Object height: Number Type of returned value: Nothing Description: Sets the height level for the helicopter. Type of returned value: Number Description: Return the current fog.html 7/11/2010 .arma2. Example: cobraOne flyInHeight 150 Category: OFP fog Compatibility: Version 2. Category: OFP http://www.25 . Example: floor 5. Category: OFP fogForecast Compatibility: Version 2.com/comref/full. The accepted range is from 50 to 1000.BIS Game Engine Scripting Commands Page 145 of 415 x: Number Type of returned value: Number Description: The floor value of x. Type of returned value: Number Description: Return the fog forecast.92 required.92 required.

27 required. Example: for "_x" from 1 to 10 do {debugLog _x. Type of returned value: Nothing Description: Forces the map to display. using C like style.} Category: Default forceEnd Type of returned value: Nothing Description: Forces the mission to terminate. See example. http://www.arma2.{_x=_x+1}] do {debugLog _x.com/comref/full. use in complette form(see example). Category: OFP forceMap show Operand types: show: Boolean Compatibility: Version 1.{_x<=10}.html 7/11/2010 .} Category: Default for forspec Operand types: forspec: Array Type of returned value: for type Description: creates cycle. Example: for [{_x=1}.BIS Game Engine Scripting Commands Page 146 of 415 for var Operand types: var: String Type of returned value: for type Description: Starts for sequence.

92 required. Type of returned value: Nothing Description: Force the speed of the given object.text . Example: format ["%1 . Example: "_x setdammage 1" forEach units group player Category: Default format format Operand types: format: Array Type of returned value: String Description: The first argument of the array is in format string. Category: OFP command forEach array Operand types: command: Code array: Array Type of returned value: Nothing Description: Executes the given command for each element in array. It's executed as follows: for each element of array an element is assigned as _x and the command is executed.com/comref/full.arma2. 1. etc. "text"] .1" http://www.html 7/11/2010 .%2 .%1". %2. %x may appear in the string in any order. result is "1 . This string may contain references to the following arguments using format %1.BIS Game Engine Scripting Commands Page 147 of 415 Example: forceMap true Category: OFP object forceSpeed speed Operand types: object: Object speed: Number Compatibility: Version 2. Each %x is replaced by the corresponding argument.

BIS Game Engine Scripting Commands Page 148 of 415 Category: OFP formation grp Operand types: grp: Object or Group Type of returned value: String Description: Returns the formation of the group ("COLUMN".html 7/11/2010 . Type of returned value: Number Description: Return the direction unit watching in formation. Category: OFP formationMembers person http://www. Example: formation group player Category: OFP formationDirection person Operand types: person: Object Compatibility: Version 2. "ECH RIGHT". Category: OFP formationLeader person Operand types: person: Object Compatibility: Version 2.arma2. "WEDGE".92 required. "VEE" or "LINE"). "STAG COLUMN".com/comref/full. Type of returned value: Object Description: Return leader of the formation. "ECH LEFT".92 required.

01 required.92 required. arg1. arg2.]: Array Compatibility: Version 2. Type of returned value: Structured text Description: Creates a structured text by replacing %1.] Operand types: [format.. Type of returned value: Array Description: Return list of units (drivers) in the formation... Type of returned value: Array Description: Return position of unit in the formation. .. Type of returned value: String Description: Return the current task of the unit in the formation. http://www.com/comref/full. etc. %2. . Category: OFP formatText [format. Category: OFP formationTask person Operand types: person: Object Compatibility: Version 2.arma2. arg2.BIS Game Engine Scripting Commands Page 149 of 415 Operand types: person: Object Compatibility: Version 2.92 required.92 required. arg1. Category: OFP formationPosition person Operand types: person: Object Compatibility: Version 2. in format by plain or structured texts given as arguments.html 7/11/2010 .

. Example: for "_x" from 10 to 20 do {. The result is often the same as groupLeader.com/comref/full..arma2. Example: formLeader player != leader player Category: OFP for "_var" from b Operand types: for "_var": for type b: Number Type of returned value: for type Description: Continue sequence of 'for' command. Example: fuel vehicle player http://www. but not always. For dead units objNull is returned.} Category: Default fuel vehicle Operand types: vehicle: Object Type of returned value: Number Description: Checks how much fuel is left in the gas tank.BIS Game Engine Scripting Commands Page 150 of 415 Example: txt = formatText ["Image: %1". image "data\isniper.paa"] Category: OFP formLeader unit Operand types: unit: Object Type of returned value: Object Description: Returns the formation leader for the given unit.code.html 7/11/2010 . in the range from 0 to 1.

Type of returned value: Array Description: Extract array from config entry. Example: weapon = gearSlotData _control Category: OFP PC getArray config Operand types: config: Config Compatibility: Version 2.35 required.html 7/11/2010 .BIS Game Engine Scripting Commands Page 151 of 415 Category: OFP gearSlotData control Operand types: control: Control Compatibility: Version 5501 required. Type of returned value: String Description: Returns gear slot item name. Example: getDammage player Category: OFP http://www.arma2.com/comref/full. Example: _array = getArray (configFile >> "CfgVehicles" >> "Thing" >> "threat") Category: OFP PC getDammage obj Operand types: obj: Object Type of returned value: Number Description: Returns the object damage in the range from 0 to 1.

Type of returned value: Object Description: Fetches a reference to the mission editor camera. Type of returned value: http://www.arma2.html 7/11/2010 . Example: getDir player Category: OFP getEditorCamera map Operand types: map: Control Compatibility: Version 2. Category: Editor getEditorMode map Operand types: map: Control Compatibility: Version 2.92 required.92 required. Type of returned value: String Description: Returns the current mode of the editor.92 required.com/comref/full. Category: Editor map getEditorObjectScope object Operand types: map: Control object: String Compatibility: Version 2.BIS Game Engine Scripting Commands Page 152 of 415 getDir obj Operand types: obj: Object Type of returned value: Number Description: Returns the object heading in the range from 0 to 360.

arma2. otherwise it's friendly.6 it results in being enemy. For a value smaller than 0. The FSM handle is the number returned by the execFSM command.html 7/11/2010 . Type of returned value: Array http://www. Type of returned value: Number Description: Returns if sides are friendly or hostile. Category: OFP group getGroupIcon ID Operand types: group: Group ID: Number Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 153 of 415 String Description: Returns the editor object scope of the specified editor object. Type of returned value: Any Description: Return the value of variable in the variable space of given FSM. Category: Editor side1 getFriend side2 Operand types: side1: Side side2: Side Compatibility: Version 5501 required.com/comref/full. Example: value = west getFriend east Category: OFP FSM handle getFSMVariable name Operand types: FSM handle: Number name: String Compatibility: Version 5501 required.

text.92 required.[[id.. [color.html 7/11/2010 .] Example: getGroupIcons group Category: OFP object getHideFrom enemy Operand types: object: Object enemy: Object Compatibility: Version 2..scale. Type of returned value: Array Description: Returns group icons params.arma2. Type of returned value: Array Description: Returns all group icons.icon.com/comref/full.]. visible] Example: getGroupIconParams group Category: OFP getGroupIcons group Operand types: group: Group Compatibility: Version 5501 required.[offsetx. Example: group getGroupIcon id Category: OFP getGroupIconParams group Operand types: group: Group Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 154 of 415 Description: Get group icon properties.. Type of returned value: http://www.[.offsety].

See setMarkerColor.y]. See setMarkerSize. Example: getMarkerColor "MarkerOne" Category: OFP getMarkerPos markerName Operand types: markerName: String Type of returned value: Array Description: Returns the marker positon in format [x. If enemy is null it is the some position in front of the object or enemy position otherwise. Category: OFP getMarkerColor marker Operand types: marker: String Compatibility: Version 1. http://www. Type of returned value: Array Description: Gets the marker size.html 7/11/2010 .z.arma2.BIS Game Engine Scripting Commands Page 155 of 415 Array Description: Returns the hiding position in format Position.21 required.com/comref/full. Example: getMarkerPos "markerOne" Category: OFP getMarkerSize marker Operand types: marker: String Compatibility: Version 1.21 required. Type of returned value: String Description: Gets the marker color.

arma2.com/comref/full. argument] Operand types: map: Control [object.35 required. Type of returned value: Number Description: Extract number from config entry. Type of returned value: String Description: Gets the type of the marker. Example: _array = getNumber (configFile >> "CfgVehicles" >> "Thing" >> "maxSpeed") Category: OFP PC map getObjectArgument [object. Example: getMarkerType "MarkerOne" Category: OFP getNumber config Operand types: config: Config Compatibility: Version 2.BIS Game Engine Scripting Commands Page 156 of 415 Example: getMarkerSize "MarkerOne" Category: OFP getMarkerType marker Operand types: marker: String Compatibility: Version 1. http://www. Type of returned value: String Description: Return name of object argument in mission editor.35 required.html 7/11/2010 .21 required. argument]: Array Compatibility: Version 2. See setMarkerType.

Category: Editor getPos obj Operand types: obj: Object Type of returned value: Array Description: Returns the object position in format Position. Type of returned value: Array Description: Return a list of all the children of the specified object.html 7/11/2010 . Type of returned value: Object Description: Return the proxy object associated with the given editor object. Category: Editor map getObjectProxy object Operand types: map: Control object: String Compatibility: Version 2.arma2.com/comref/full. Example: getPos player Category: OFP getPos location http://www.92 required.BIS Game Engine Scripting Commands Page 157 of 415 Category: Editor map getObjectChildren object Operand types: map: Control object: String Compatibility: Version 2.92 required.

html 7/11/2010 .BIS Game Engine Scripting Commands Page 158 of 415 Operand types: location: Location Compatibility: Version 5501 required."FAST". Category: OFP getText config Operand types: config: Config Compatibility: Version 2. http://www.com/comref/full.53 required. Type of returned value: Array Description: Returns the object position in format PositionASL.92 required.arma2. Example: getPosASL player Category: OFP object getSpeed speedMode Operand types: object: Object speedMode: String Compatibility: Version 2.35 required."SLOW". Category: Location getPosASL obj Operand types: obj: Object Compatibility: Version 2. Type of returned value: Array Description: Return (raw) position of given location."NORMAL". Type of returned value: Number Description: Get the speed for the given speed mode. SpeedMode can be: "AUTO".

Type of returned value: Any Description: Return the value of variable in the given namespace. Type of returned value: Any Description: Return the value of variable in the variable space of given group.com/comref/full. Type of returned value: Any Description: http://www. Category: OFP location getVariable name Operand types: location: Location name: String Compatibility: Version 2.arma2.92 required. Example: _array = getText (configFile >> "CfgVehicles" >> "Thing" >> "icon") Category: OFP PC namespace getVariable name Operand types: namespace: Namespace name: String Compatibility: Version 5501 required. Category: Default group getVariable name Operand types: group: Group name: String Compatibility: Version 5501 required.html 7/11/2010 .BIS Game Engine Scripting Commands Page 159 of 415 Type of returned value: String Description: Extract text from config entry.

Type of returned value: Nothing Description: Get variable from the variable space of given map.BIS Game Engine Scripting Commands Page 160 of 415 Return the value of variable in the variable space of given location.arma2. Type of returned value: Any Description: Return the value of variable in the variable space of given object.html 7/11/2010 .92 required. Category: Identity http://www. Category: OFP map getVariable name Operand types: map: Control name: String Compatibility: Version 2. Category: Location object getVariable name Operand types: object: Object name: String Compatibility: Version 2. Category: Editor task getVariable name Operand types: task: Task name: String Compatibility: Version 2.92 required.92 required. Type of returned value: Any Description: Return the value of variable in the variable space of given task.com/comref/full.

you have to execute it on all of them. The format of waypoint is Waypoint. Type of returned value: Nothing Description: Control what the unit is glancing at (target or position) (format Position) Example: someSoldier glanceAt otherSoldier. If you want the message to show on all computers.html 7/11/2010 .BIS Game Engine Scripting Commands Page 161 of 415 getWPPos waypoint Operand types: waypoint: Array Compatibility: Version 1. Note: this function only types text to the list. otherSoldier glanceAt getMarkerPos "markerOne" Category: OFP unit globalChat chatText Operand types: unit: Object chatText: String Type of returned value: Nothing Description: Types text to the global radio channel.com/comref/full.arma2. Example: soldierOne globalChat "Show this text" Category: OFP http://www.21 required. 1] Category: OFP unit(s) glanceAt position Operand types: unit(s): Object or Array position: Object or Array Compatibility: Version 2. it does not broadcast the message. Type of returned value: Array Description: Gets the waypoint position. Example: getWPPos [groupOne.40 required.

com/comref/full.arma2. Example: group player == group leader player Category: OFP unit groupChat chatText Operand types: http://www. Example: soldierOne globalRadio "messageOne" Category: OFP goto label Operand types: label: String Type of returned value: Nothing Description: Only in scripts: go to given label. Note: the string argument is used here. Be sure to use double quotes around the label name in goto.BIS Game Engine Scripting Commands Page 162 of 415 unit globalRadio radioName Operand types: unit: Object radioName: String Type of returned value: Nothing Description: Sends the message to the global radio channel.ext file or radio protocol. For dead units. The message is defined in the description. grpNull is returned. Example: goto "Loop" Category: OFP group obj Operand types: obj: Object Type of returned value: Group Description: Returns the group to which the given unit is assigned.html 7/11/2010 .

BIS Game Engine Scripting Commands Page 163 of 415 unit: Object chatText: String Type of returned value: Nothing Description: Types text to the group radio channel. Type of returned value: Boolean Description: Return if groups icon raises onClick and onOver events.ext file or radio protocol. Type of returned value: Array Description: Return group icons are visible. Note: this function only types text to the list. you have to execute it on all of them.com/comref/full. Example: http://www. If you want the message to show on all computers. Category: OFP groupIconsVisible Compatibility: Version 5501 required. Category: OFP unit groupRadio radioName Operand types: unit: Object radioName: String Type of returned value: Nothing Description: Sends the message to the group radio channel.arma2. The message is defined in the description. Example: soldierOne groupChat "Show this text" Category: OFP groupIconSelectable Compatibility: Version 5501 required. it does not broadcast the message.html 7/11/2010 .

This value is not equal to anything.com/comref/full. Example: player groupSelectUnit [unit.html 7/11/2010 . Type of returned value: Nothing Description: Select unit from unit's group.bool]: Array Compatibility: Version 5501 required. Type of returned value: Array Description: Returns selected groups in sgroup.BIS Game Engine Scripting Commands Page 164 of 415 soldierOne groupRadio "messageOne" Category: OFP groupSelectedUnits unit Operand types: unit: Object Compatibility: Version 5501 required.arma2.bool] Operand types: unit: Object [unit.true] Category: OFP grpNull Type of returned value: Group Description: A non-existing group. Example: array = groupSelectedUnits unit Category: OFP unit groupSelectUnit [unit. result is false Category: OFP http://www. including itself. Example: group player == objNull .

Example: handsHit leader player Category: OFP unit hasWeapon weaponName Operand types: http://www.html 7/11/2010 .com/comref/full. Example: gunner vehicle player Category: OFP halt Compatibility: Version 2. Type of returned value: Nothing Description: Stops the program into a debugger. but a person. If the vehicle is not a vehicle.arma2.00 required.BIS Game Engine Scripting Commands Page 165 of 415 gunner vehicle Operand types: vehicle: Object Type of returned value: Object Description: Returns the gunner of the vehicle. Example: halt Category: Default handsHit soldier Operand types: soldier: Object Type of returned value: Number Description: Checks whether the soldier's hands are hit (causing inaccurate aiming). the person is returned.

Example: player hasWeapon "M16" Category: OFP hcAllGroups unit Operand types: unit: Object Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 166 of 415 unit: Object weaponName: String Type of returned value: Boolean Description: Checks whether the unit has the given weapon.html 7/11/2010 . Return value is [string. Example: array = hcAllGroups unit Category: OFP unit hcGroupParams group Operand types: unit: Object group: Group Compatibility: Version 5501 required. Type of returned value: Array Description: Returns parameters describing group in high command bar. Type of returned value: Array Description: Returns selected groups in high command.float[4]] Example: unit hcGroupParams group Category: OFP hcLeader group Operand types: http://www.com/comref/full.arma2.

Type of returned value: Nothing Description: Removes group from unit's high command bar.BIS Game Engine Scripting Commands Page 167 of 415 group: Group Compatibility: Version 5501 required.com/comref/full. Example: unit HCRemoveGroup group Category: OFP hcSelected unit http://www. Type of returned value: Nothing Description: Remove all groups from unit's high command bar. Example: hcRemoveAllGroups unit Category: OFP unit hcRemoveGroup group Operand types: unit: Object group: Group Compatibility: Version 5501 required. Example: hcLeader group Category: OFP hcRemoveAllGroups unit Operand types: unit: Object Compatibility: Version 5501 required.arma2.html 7/11/2010 . Type of returned value: Object Description: Returns group's HC commander.

html 7/11/2010 . teamgreen. Example: array = hcSelected unit Category: OFP unit hcSelectGroup array Operand types: unit: Object array: Array Compatibility: Version 5501 required."HQ". Type of returned value: Nothing Description: Add group to unit's high command bar. Example: unit hcSelectGroup [group. teamyellow) . Example: unit hcSetGroup [group.arma2.true] Category: OFP unit hcSetGroup array Operand types: unit: Object array: Array Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 168 of 415 Operand types: unit: Object Compatibility: Version 5501 required. Group is the only necessary parameter. Array parameters are group. teamblue."teamred"] or player hcSetGroup [group] Category: OFP http://www. group name and team (teammain. Type of returned value: Array Description: Returns selected groups in high command. Type of returned value: Nothing Description: Select given group in HC bar. teamred.com/comref/full.

com/comref/full. Example: hcShowBar true Category: OFP hcShownBar Compatibility: Version 5501 required.arma2. Type of returned value: Nothing Description: Shows or hides HC bar. Category: OFP hideBody person Operand types: person: Object Compatibility: Version 2. Type of returned value: Boolean Description: Return a list of all groups.10 required. Type of returned value: Nothing Description: Hides the body of the given person.BIS Game Engine Scripting Commands Page 169 of 415 hcShowBar bool Operand types: bool: Boolean Compatibility: Version 5501 required. There must be some groups under hc command to show hc bar.html 7/11/2010 . Example: hideBody player Category: OFP hint text Operand types: text: Text or String Type of returned value: http://www.

The text can contain several lines. The text can contain several lines. Type of returned value: Nothing Description: http://www.01 required.BIS Game Engine Scripting Commands Page 170 of 415 Nothing Description: Shows a text hint.com/comref/full. \n is used to indicate the end of a line. \n is used to indicate the end of a line. Example: hintC "Press W to move forward" Category: OFP title hintC text Operand types: title: String text: Structured text Compatibility: Version 2.01 required.arma2. Category: OFP title hintC text Operand types: title: String text: String Compatibility: Version 2.html 7/11/2010 . Type of returned value: Nothing Description: Creates a hint dialog with the given title and text. This hint has to be confirmed. Example: hint "Press W to move forward" Category: OFP hintC text Operand types: text: String Type of returned value: Nothing Description: Shows a text hint.

text2.. \n is used to indicate the end of a line.. text2. Category: OFP http://www.01 required. Type of returned value: Nothing Description: Same as hint. The text can contain several lines. but without a sound.]: Array Compatibility: Version 2.arma2. Type of returned value: Nothing Description: Creates a hint dialog with the given title and text..com/comref/full..] Operand types: title: String [text1. Texts can be plain or structured.BIS Game Engine Scripting Commands Page 171 of 415 Creates a hint dialog with the given title and text. Category: OFP hintCadet text Operand types: text: Text or String Type of returned value: Nothing Description: Shows a text hint only when using cadet mode. .html 7/11/2010 . . Category: OFP title hintC [text1. Example: hintCadet "Press W to move forward" Category: OFP hintSilent text Operand types: text: Text or String Compatibility: Version 5501 required.

01 required.com/comref/full. Example: txt1 = image "data\isniper.html" Category: OFP PC if condition Operand types: condition: Boolean Compatibility: Version 1.html 7/11/2010 .BIS Game Engine Scripting Commands Page 172 of 415 control htmlLoad filename Operand types: control: Control filename: String Compatibility: Version 2. Type of returned value: Nothing Description: Load HTML from file to given control.paa" Category: OFP http://www.arma2. Example: if (a>b) then {a=b} Category: Default image filename Operand types: filename: String Compatibility: Version 2. Type of returned value: If Type Description: The first part of the if command. Type of returned value: Structured text Description: Creates a structured text containing the given image.85 required. Example: _control htmlLoad "briefing.53 required.

Type of returned value: Nothing Description: Imports all groups into the RTE. Example: 1 in [0. result is true Category: Default position in location Operand types: position: Array location: Location Compatibility: Version 2. http://www. Type of returned value: Number Description: Return importance of given location.92 required. 2] .com/comref/full. 1. Category: Location x in array Operand types: x: Any array: Array Type of returned value: Boolean Description: Checks whether x is equal to any element in the array.92 required.html 7/11/2010 . Category: Editor importance location Operand types: location: Location Compatibility: Version 2.arma2.90 required.BIS Game Engine Scripting Commands Page 173 of 415 importAllGroups map Operand types: map: Control Compatibility: Version 2.

Example: player in jeepOne Category: OFP fireplace inflame burn Operand types: fireplace: Object burn: Boolean Type of returned value: Nothing Description: Controls fireplace buring. Category: Location soldier in vehicle Operand types: soldier: Object vehicle: Object Type of returned value: Boolean Description: Checks whether the soldier is mounted in the vehicle. Set to true to inflame the fireplace. Type of returned value: Boolean Description: Check if fireplace is inflamed (buring). Example: fireplaceOne inflame true Category: OFP inflamed fireplace Operand types: fireplace: Object Compatibility: Version 1.arma2.com/comref/full. http://www.04 required.BIS Game Engine Scripting Commands Page 174 of 415 Type of returned value: Boolean Description: Check if the position is inside area defined by the location.html 7/11/2010 .

function] Operand types: [handler name.90 required.com/comref/full. Example: _base = inheritsFrom (configFile >> "CfgVehicles" >> "Car") Category: OFP PC initAmbientLife Compatibility: Version 2.92 required.BIS Game Engine Scripting Commands Page 175 of 415 Example: inflamed fireplaceOne Category: OFP inGameUISetEventHandler [handler name.arma2. function]: Array Compatibility: Version 2. Type of returned value: Nothing Description: Sets given event handler of in-game UI. Category: OFP inheritsFrom config Operand types: config: Config Compatibility: Version 2. Type of returned value: Nothing Description: Initialize the ambient life.91 required. Category: OFP inputAction name http://www. Type of returned value: Config Description: Returns base entry of config entry.html 7/11/2010 .

53 required. 1500. Category: OFP map insertEditorObject [type. value1.].]. 2]] Category: OFP isArray config Operand types: config: Config http://www.. Type of returned value: String Description: Insert an object to the editor and assign arguments. end]: Array Compatibility: Version 2.com/comref/full. value.. lod name]: Array [begin..92 required. Example: [tank.. 1500. end] Operand types: [object. subtype class] Operand types: map: Control [type. Subtype class is optional. Category: Editor [object.BIS Game Engine Scripting Commands Page 176 of 415 Operand types: name: String Compatibility: Version 5500 required.arma2. lod name] intersect [begin. [name1. Type of returned value: Number Description: Return the state of input devices mapped to given input action (see CfgDefaultKeysMapping for action names). . value. Create script is not called. subtype class]: Array Compatibility: Version 2. [1550. . "VIEW" intersect [[1500. [name1. 2]. value1. Returns the ID of the new EditorObject.html 7/11/2010 . Type of returned value: Array Description: Find named selection in object which is in specified lod intersected by given section of a line.

com/comref/full.90 required. Type of returned value: Boolean Description: Check if config entry represents config class. Category: OFP isEngineOn vehicle Operand types: vehicle: Object Compatibility: Version 1. Type of returned value: Boolean Description: Return true for dedicated server. result is false Category: OFP PC isClass config Operand types: config: Config Compatibility: Version 2. Example: _ok = isArray (configFile >> "CfgVehicles") . result is true Category: OFP PC isDedicated Compatibility: Version 5501 required. Type of returned value: Boolean Description: Check if config entry represents array.arma2.html 7/11/2010 .35 required. Type of returned value: Boolean Description: http://www.BIS Game Engine Scripting Commands Page 177 of 415 Compatibility: Version 2. Example: _ok = isClass (configFile >> "CfgVehicles") .35 required.

arma2.float gradientRadius.bool onShore. Example: newposition = position isFlatEmpty(10.float onWater. 0.object skipobj]: Array Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 178 of 415 Checks whether the engine is on. Type of returned value: Array Description: Chek if given area is flat and emty. Type of returned value: Boolean Description: http://www.5.float precizePos.92 required. false. Example: on = isEngineOn vehicle player Category: OFP position isFlatEmpty [float minDistance.bool onShore.html 7/11/2010 .float onWater.float gradientRadius.float precizePos.float maxGradient. 0. Type of returned value: Boolean Description: Returns true if the specified person is subgroup leader. player) Category: OFP isFormationLeader person Operand types: person: Object Compatibility: Version 2.com/comref/full.object skipobj] Operand types: position: Array [float minDistance.92 required. 0.float maxGradient. 5. Category: OFP isHidden person Operand types: person: Object Compatibility: Version 2.

Category: OFP isKeyActive keyName Operand types: keyName: String Compatibility: Version 2.BIS Game Engine Scripting Commands Page 179 of 415 Return whether the person is hidden (reached the hiding position).arma2.06 required. Example: vehicle player isKindOf "Tank" Category: OFP typeName1 isKindOf typeName2 Operand types: typeName1: String typeName2: String Compatibility: Version 5160 required.html 7/11/2010 . Type of returned value: Boolean Description: Checks whether the type typeName1 is inherited from the type typeName1.com/comref/full. http://www.30 required. Example: ok = isKeyActive "M04" Category: OFP object isKindOf typeName Operand types: object: Object typeName: String Compatibility: Version 2. Type of returned value: Boolean Description: Checks whether the object is of the given type. Type of returned value: Boolean Description: Checks whether the given key is active in the current user profile.

00 required.BIS Game Engine Scripting Commands Page 180 of 415 Example: "Tank" isKindOf "Land" .arma2. Type of returned value: Boolean Description: Return true if multiPlayer.13 required.com/comref/full. Category: OFP isNil variable Operand types: variable: Compatibility: Version 2.} http://www. Type of returned value: Boolean Description: Tests whether the variable is null.html 7/11/2010 . Type of returned value: Boolean Description: Checks whether the object is marked for weapons collection. Example: if (isNil("_pokus")) then {_pokus=0. The function returns true if the variable is null and false if it's not. result is true Category: OFP isMarkedForCollection object Operand types: object: Object Compatibility: Version 2. Example: marked = isMarkedForCollection truck Category: OFP isMultiplayer Compatibility: Version 5501 required.

result is true Category: OFP PC isNull grp Operand types: grp: Group Type of returned value: Boolean Description: Checks whether the value is equal to grpNull. even to itself. Example: isNull controlNull . Category: Location isNull control Operand types: control: Control Compatibility: Version 2. Note: a==GrpNull does not work. result is false Category: OFP http://www. Type of returned value: Boolean Description: Check whether the value is null.92 required. Note: a==controlNull does not work. because controlNull is not equal to anything.arma2.html 7/11/2010 . Example: isNull group player .BIS Game Engine Scripting Commands Page 181 of 415 Category: Default isNull location Operand types: location: Location Compatibility: Version 5501 required. because grpNull is not equal to anything.com/comref/full. even to itself. Type of returned value: Boolean Description: Checks whether the value is equal to controlNull.

arma2. because taskNull is not equal to anything.BIS Game Engine Scripting Commands Page 182 of 415 isNull task Operand types: task: Task Compatibility: Version 5160 required. Note: a==displayNull does not work. Type of returned value: Boolean Description: Checks whether the value is equal to taskNull. even to itself. even to itself.92 required. because displayNull is not equal to anything. result is true Category: Identity isNull display Operand types: display: Display Compatibility: Version 2. because objNull is not equal to anything. even to itself. Note: a==ObjNull does not work. result is true Category: OFP PC isNull obj Operand types: obj: Object Type of returned value: Boolean Description: Checks whether the value is equal to objNull.com/comref/full. Example: isNull displayNull . Example: isNull taskNull . Type of returned value: Boolean Description: Checks whether the value is equal to displayNull. Note: a==TaskNull does not work. result is true Category: OFP http://www.html 7/11/2010 . Example: isNull objNull .

35 required.com/comref/full.92 required. result is false Category: OFP PC isOnRoad position or object Operand types: position or object: Object or Array Compatibility: Version 5501 required.html 7/11/2010 .92 required. http://www. Example: _ok = isNumber (configFile >> "CfgVehicles") . Type of returned value: Boolean Description: Check if given person is the player.BIS Game Engine Scripting Commands Page 183 of 415 isNumber config Operand types: config: Config Compatibility: Version 2. Category: OFP isRealTime map Operand types: map: Control Compatibility: Version 2. Category: OFP isPlayer person Operand types: person: Object Compatibility: Version 2.arma2. Type of returned value: Boolean Description: Check whether given position is on road. Type of returned value: Boolean Description: Check if config entry represents number.

html 7/11/2010 .com/comref/full.arma2. Type of returned value: Boolean Description: Check if config entry represents text. Type of returned value: Boolean Description: Returns true if the computer is the server.BIS Game Engine Scripting Commands Page 184 of 415 Type of returned value: Boolean Description: Returns true if the mission editor is operating in real time mode.35 required. Type of returned value: Boolean Description: Returns true if the editor is set to draw 3D icons. Category: OFP isShowing3DIcons map Operand types: map: Control Compatibility: Version 2. Category: Editor isText config Operand types: config: Config Compatibility: Version 2. Example: _ok = isText (configFile >> "CfgVehicles") .92 required. result is false http://www.92 required. Example: _isRealTime = isRealTime _map Category: Editor isServer Compatibility: Version 2.

this one is used. Note: This function is unsupported in MP in version 1. Type of returned value: Array Description: Returns an array of names of all special items of the vehicle. Example: player joinAs [_group.BIS Game Engine Scripting Commands Page 185 of 415 Category: OFP PC items unit Operand types: unit: Object Compatibility: Version 5501 required. if position id is available.com/comref/full.arma2.html 7/11/2010 . unitTwo] join player Category: OFP unit joinAs [group. Note: the total number of group members cannot exceed 12. Example: items player Category: OFP unitArray join group Operand types: unitArray: Array group: Object or Group Type of returned value: Nothing Description: Joins all units in the array to the given group. id]: Array Type of returned value: Nothing Description: Joins the unit to the given group. Example: [unitOne.33 and before. id] Operand types: unit: Object [group. 4] Category: OFP http://www.

id] Operand types: unit: Object [group.com/comref/full. Example: _unit kbAddDatabase "chat. unitTwo] joinSilent player Category: OFP person kbAddDatabase filename Operand types: person: Object filename: String Compatibility: Version 2.html 7/11/2010 . this one is used. Avoid any radio communication related to joining. Example: player joinAsSilent [_group. Example: [unitOne.BIS Game Engine Scripting Commands Page 186 of 415 unit joinAsSilent [group. 4] Category: OFP unitArray joinSilent group Operand types: unitArray: Array group: Object or Group Type of returned value: Nothing Description: Joins all units in the array to the given group.txt" Category: OFP PC http://www. Type of returned value: Boolean Description: Register knowledge base database to given person.arma2. id]: Array Type of returned value: Nothing Description: Joins the unit to the given group.42 required. if position id is available. Avoid any radio communication related to joining.

html 7/11/2010 . filename(. Category: OFP PC person kbReact [receiver. topic.arma2. sentence id. argument value..92 required. Type of returned value: Nothing Description: Register conversation topic to given person. . player event handler))]: Array Compatibility: Version 2. Type of returned value: Boolean Description: Check if conversation topic was registered to given person. filename(.txt" Category: OFP PC person kbAddTopic [name.] http://www.. task type(. player event handler))] Operand types: person: Object [name. Category: OFP PC person kbHasTopic name Operand types: person: Object name: String Compatibility: Version 2. argument text.com/comref/full.92 required. argument speech]. Example: _unit kbAddDatabase "chat.45 required. task type(. [argument name.BIS Game Engine Scripting Commands Page 187 of 415 person kbAddDatabaseTargets filename Operand types: person: Object filename: String Compatibility: Version 2. Type of returned value: Boolean Description: Register target list knowledge base database to given person.

92 required. topic. [argument name. sentence id..]: Array Compatibility: Version 2. sentence id. . Category: OFP PC person kbWasSaid [receiver. argument speech]. argument speech]. . topic.BIS Game Engine Scripting Commands Page 188 of 415 Operand types: person: Object [receiver. Type of returned value: Nothing Description: Unregister conversation topic from given person. sentence id. Type of returned value: Nothing Description: Pass a non-verbal communication to the receiver.] Operand types: person: Object [receiver. Category: OFP PC person kbTell [receiver. argument value.html 7/11/2010 . . argument text. topic. age]: Array http://www. argument value. sentence id. age] Operand types: person: Object [receiver. topic. [argument name.. Type of returned value: Nothing Description: Make the person tell to the receiver the sentence. Category: OFP PC person kbRemoveTopic name Operand types: person: Object name: String Compatibility: Version 2. [argument name.. sentence id.. argument text. max. topic..92 required. max. argument speech]. argument text.]: Array Compatibility: Version 5500 required. argument value.com/comref/full..arma2.

result is "Enter" Category: OFP keyName dikCode Operand types: dikCode: Number Compatibility: Version 2.com/comref/full. Type of returned value: String Description: Returns the name of a button (on the keyboard.01 required. Type of returned value: Boolean Description: Check if given item was said by person to someone. mouse or joystick) with the given code. containing an image or name (if no image is found) of the button (on the keyboard. Category: OFP PC keyImage dikCode Operand types: dikCode: Number Compatibility: Version 2. Example: name = keyImage 28 .html 7/11/2010 .01 required. result is "Enter" Category: OFP unit knowsAbout target Operand types: unit: Object or Group target: Object Type of returned value: http://www. Type of returned value: Structured text Description: Returns a structured text.BIS Game Engine Scripting Commands Page 189 of 415 Compatibility: Version 5500 required.arma2. mouse or joystick) with the given code. Example: name = keyName 28 .

The landing mode may be "LAND" (a complete stop).BIS Game Engine Scripting Commands Page 190 of 415 Number Description: Checks whether the unit knows about the target (and how much). the vehicle commander is considered instead.com/comref/full. If the unit is a vehicle. Example: east knowsAbout jeepOne Category: OFP helicopter land mode Operand types: helicopter: Object mode: String Type of returned value: Nothing Description: Forces a helicopter landing.html 7/11/2010 . Type of returned value: Number Description: Checks whether the side knows about the target (and how much). Example: soldierOne knowsAbout jeepOne Category: OFP side knowsAbout target Operand types: side: Side target: Object Compatibility: Version 5501 required. Example: cobraOne land "LAND" Category: OFP airplane landAt airportId Operand types: airplane: Object http://www.arma2. "GET OUT" (hovering low for another unit to get out) or "NONE" (cancel landing). "GET IN" (hovering very low for another unit to get in).

Example: _index = lbAdd [101.arma2.com/comref/full. "First item"] Category: Resistance control lbAdd text Operand types: http://www. The value can be "Found" (position found). It returns the index of the newly added item. Category: OFP lbAdd [idc.50 required.92 required.html 7/11/2010 . Type of returned value: Number Description: Adds an item with the given text to the listbox or combobox with id idc of the topmost user dialog. Type of returned value: String Description: Return the result of helicopter landing position searching (performed after land command). text] Operand types: [idc.BIS Game Engine Scripting Commands Page 191 of 415 airportId: Number Compatibility: Version 2. "NotFound" (position not found). text]: Array Compatibility: Version 1. Type of returned value: Nothing Description: Order AI airplane to land at given airport Example: plane landAt 0 Category: OFP landResult helicopter Operand types: helicopter: Object Compatibility: Version 5501 required. "NotReady" (position searching is still in progress) or empty string when wrong argument given.

50 required.arma2. index] http://www.html 7/11/2010 .91 required. Type of returned value: Number Description: Adds an item with the given text to the given listbox or combobox.BIS Game Engine Scripting Commands Page 192 of 415 control: Control text: String Compatibility: Version 2. Example: lbClear _control Category: OFP PC lbColor [idc.91 required.com/comref/full. Example: lbClear 101 Category: Resistance lbClear control Operand types: control: Control Compatibility: Version 2. It returns the index of the newly added item. Example: _index = _control lbAdd "First item" Category: OFP PC lbClear idc Operand types: idc: Number Compatibility: Version 1. Type of returned value: Nothing Description: Clears all items in the listbox or combobox with id idc of the topmost user dialog. Type of returned value: Nothing Description: Clears all items in the given listbox or combobox.

Example: _color = _control lbColor 0 Category: OFP PC lbCurSel idc Operand types: idc: Number Compatibility: Version 1.50 required.BIS Game Engine Scripting Commands Page 193 of 415 Operand types: [idc. 0] Category: Resistance control lbColor index Operand types: control: Control index: Number Compatibility: Version 2.91 required. Example: _color = lbColor [101. Type of returned value: Array Description: Returns the text color of the item with the given index of the listbox or combobox with id idc of the topmost user dialog. Type of returned value: Number Description: Returns the index of the selected item of the listbox or combobox with id idc of the topmost user dialog.html 7/11/2010 .com/comref/full. The color is returned in format Color.50 required. Example: _index = lbCurSel 101 Category: Resistance http://www.arma2. index]: Array Compatibility: Version 1. Type of returned value: Array Description: Returns the text color of the item with the given index of the given listbox or combobox.

com/comref/full. Type of returned value: String Description: Returns the additional text (invisible) in an item with the given index of the given listbox or combobox. 0] Category: Resistance control lbData index Operand types: control: Control index: Number Compatibility: Version 2. Example: _index = lbCurSel _control Category: OFP PC lbData [idc.html 7/11/2010 . index] Operand types: [idc.91 required. Example: _data = lbData [101.arma2.91 required. index]: Array Compatibility: Version 1. Type of returned value: String Description: Returns the additional text (invisible) in an item with the given index of the listbox or combobox with id idc of the topmost user dialog.BIS Game Engine Scripting Commands Page 194 of 415 lbCurSel control Operand types: control: Control Compatibility: Version 2. Type of returned value: Number Description: Returns the index of the selected item of the given listbox or combobox.50 required. Example: _data = _control lbData 0 Category: OFP PC http://www.

index] Operand types: [idc.arma2. Type of returned value: Boolean Description: Check whether given row of the given listbox is selected.92 required. Example: lbDelete [101.html 7/11/2010 . Example: _selected = _control lbIsSelected 0 http://www. Example: _control lbDelete 0 Category: OFP PC control lbIsSelected index Operand types: control: Control index: Number Compatibility: Version 2. 0] Category: Resistance control lbDelete index Operand types: control: Control index: Number Compatibility: Version 2. index]: Array Compatibility: Version 1.BIS Game Engine Scripting Commands Page 195 of 415 lbDelete [idc. Type of returned value: Nothing Description: Removes the item with the given index from the given listbox or combobox.91 required.com/comref/full.50 required. Type of returned value: Nothing Description: Removes the item with the given index from the listbox or combobox with id idc of the topmost user dialog.

Type of returned value: Array Description: Returns the array of selected rows indices in the given listbox.91 required.html 7/11/2010 . Type of returned value: String Description: Returns the picture name of the item with the given index of the given listbox or combobox. 0] Category: Resistance control lbPicture index Operand types: control: Control index: Number Compatibility: Version 2.BIS Game Engine Scripting Commands Page 196 of 415 Category: OFP PC lbPicture [idc.92 required. Example: http://www. Type of returned value: String Description: Returns the picture name of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.50 required.arma2.com/comref/full. Example: _picture = _control lbPicture 0 Category: OFP PC lbSelection control Operand types: control: Control Compatibility: Version 2. index]: Array Compatibility: Version 1. Example: _picture = lbPicture [101. index] Operand types: [idc.

index] Operand types: [idc. 1. Color is in format Color. 0.com/comref/full. index]: Array Compatibility: Version 1. Type of returned value: Nothing Description: Sets the color of the item with the given index of the listbox or combobox with id idc of the topmost user dialog to the given color. color] Operand types: control: Control [index. Example: lbSetColor [101.50 required. color]: Array Compatibility: Version 2.BIS Game Engine Scripting Commands Page 197 of 415 _indices = lbSelection _control Category: OFP PC lbSetColor [idc. color]: Array Compatibility: Version 1. Color is in format Color.91 required. color] Operand types: [idc.5]] Category: OFP PC lbSetCurSel [idc.50 required. 0. [0. Example: _control lbSetColor [0. index. [0.html 7/11/2010 . Type of returned value: Nothing Description: http://www. 1.arma2. 0. index. 0. Type of returned value: Nothing Description: Sets the text color of the item with the given index of the given listbox or combobox. 0.5]] Category: Resistance control lbSetColor [index.

data]: Array Compatibility: http://www. Type of returned value: Nothing Description: Sets the additional text (invisible) in the item with the given index of the listbox or combobox with id idc of the topmost user dialog to the given data.com/comref/full. 0] Category: Resistance control lbSetCurSel index Operand types: control: Control index: Number Compatibility: Version 2. "#1"] Category: Resistance control lbSetData [index. data] Operand types: control: Control [index. Example: _control lbSetCurSel 0 Category: OFP PC lbSetData [idc. Example: lbSetCurSel [101. Example: lbSetData [101. index. data]: Array Compatibility: Version 1.91 required. 1. Type of returned value: Nothing Description: Selects the item with the given index of the given listbox or combobox.html 7/11/2010 .arma2.BIS Game Engine Scripting Commands Page 198 of 415 Selects the item with the given index of the listbox or combobox with id idc of the topmost user dialog. data] Operand types: [idc.50 required. index.

The picture is searched in the mission directory. index. "iskoda"] Category: Resistance control lbSetPicture [index. name]: Array Compatibility: Version 2.arma2.html 7/11/2010 . the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory). "iskoda"] Category: OFP PC http://www. name] Operand types: control: Control [index. name] Operand types: [idc. The picture is searched in the mission directory. Name is the picture name.91 required.BIS Game Engine Scripting Commands Page 199 of 415 Version 2.91 required. Type of returned value: Nothing Description: Sets the picture in the item with the given index of the given listbox or combobox. the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory). Name is the picture name. name]: Array Compatibility: Version 1. 0. "#1"] Category: OFP PC lbSetPicture [idc.50 required. Example: _control lbSetPicture [0.com/comref/full. Example: lbSetPicture [101. Example: _control lbSetData [1. Type of returned value: Nothing Description: Sets the picture in the item with the given index of the listbox or combobox with id idc of the topmost user dialog. Type of returned value: Nothing Description: Sets the additional text (invisible) in the item with the given index of the given listbox or combobox to the given data. index.

true] Category: OFP PC lbSetValue [idc. selected] Operand types: control: Control [index.html 7/11/2010 . Type of returned value: Nothing Description: Sets the additional integer value in the item with the given index of the given listbox or combobox to the given value. Listbox must support multiple selection Example: _control lbSetSelection [0. value] Operand types: [idc. value] Operand types: control: Control [index. Type of returned value: Nothing Description: Set the selection state of the given row of the given listbox. selected]: Array Compatibility: Version 5501 required. Type of returned value: Nothing Description: Sets the additional integer value in the item with the given index of the listbox or combobox with id idc of the topmost user dialog to the given value.91 required. 1] Category: Resistance control lbSetValue [index. 1] http://www. Example: _control lbSetValue [0.BIS Game Engine Scripting Commands Page 200 of 415 control lbSetSelected [index.50 required.arma2. value]: Array Compatibility: Version 2.com/comref/full. index. value]: Array Compatibility: Version 1. 0. Example: lbSetValue [101. index.

com/comref/full. Type of returned value: Number Description: Sorts the given listbox or combobox by item text.html 7/11/2010 . Example: lbSort _control http://www.arma2.91 required. Example: _n = lbSize 101 Category: Resistance lbSort control Operand types: control: Control Compatibility: Version 5148 required. Type of returned value: Number Description: Returns the number of items in the listbox or combobox with id idc of the topmost user dialog.BIS Game Engine Scripting Commands Page 201 of 415 Category: OFP PC lbSize control Operand types: control: Control Compatibility: Version 2. Example: _n = lbSize _control Category: OFP PC lbSize idc Operand types: idc: Number Compatibility: Version 1. Type of returned value: Number Description: Returns the number of items in the given listbox or combobox.50 required.

com/comref/full. Example: _text = lbText [101. Example: lbSortByValue _control Category: OFP PC lbText [idc.html 7/11/2010 . index]: Array Compatibility: Version 1.91 required.BIS Game Engine Scripting Commands Page 202 of 415 Category: OFP PC lbSortByValue control Operand types: control: Control Compatibility: Version 5148 required. Example: http://www.50 required. 0] Category: Resistance control lbText index Operand types: control: Control index: Number Compatibility: Version 2. index] Operand types: [idc. Type of returned value: Number Description: Sorts the given listbox or combobox by item value. Type of returned value: String Description: Returns the shown text in the item with the given index of the listbox or combobox with id idc of the topmost user dialog.arma2. Type of returned value: String Description: Returns the shown text in the item with the given index of the given listbox or combobox.

0] Category: Resistance control lbValue index Operand types: control: Control index: Number Compatibility: Version 2. Example: _value = _control lbValue 0 Category: OFP PC leader unit Operand types: unit: Object Type of returned value: Object Description: Returns the group leader for the given unit.BIS Game Engine Scripting Commands Page 203 of 415 _text = _control lbText 0 Category: OFP PC lbValue [idc. index]: Array Compatibility: Version 1. index] Operand types: [idc.html 7/11/2010 . Type of returned value: Number Description: Returns the additional integer value in the item with the given index of the given listbox or combobox. http://www.50 required.com/comref/full.arma2. For dead units. Type of returned value: Number Description: Returns the additional integer value in the item with the given index of the listbox or combobox with id idc of the topmost user dialog. Example: _value = lbValue [101. objNull is returned.91 required.

html 7/11/2010 . Example: groupOne leaveVehicle jeepOne Category: OFP http://www. grpNull is returned.arma2.BIS Game Engine Scripting Commands Page 204 of 415 Example: leader player Category: OFP leader grp Operand types: grp: Group Type of returned value: Object Description: Returns the group leader for the given group. It unassigns all grouped units from the vehicle. Example: soldierOne leaveVehicle jeepOne Category: OFP group leaveVehicle vehicle Operand types: group: Group vehicle: Object Type of returned value: Nothing Description: Ceases the using of the vehicle in the group. Example: leader group player == leader player Category: OFP group leaveVehicle vehicle Operand types: group: Object vehicle: Object Type of returned value: Nothing Description: Ceases the using of the vehicle in the group. For a dead unit. It unassigns all grouped units from the vehicle.com/comref/full.

arma2. Type of returned value: Nothing Description: Detach light from object. position] Operand types: light: Object [object.58 required.html 7/11/2010 . Category: OFP lightIsOn lamppost Operand types: lamppost: Object Compatibility: Version 1. Category: OFP light lightAttachObject [object.58 required. position]: Array Compatibility: Version 2. http://www.BIS Game Engine Scripting Commands Page 205 of 415 lifeState unit Operand types: unit: Object Compatibility: Version 5501 required.04 required. Category: OFP lightDetachObject light Operand types: light: Object Compatibility: Version 2. Type of returned value: String Description: Returns the life state of the given unit.com/comref/full. Type of returned value: Nothing Description: Attach light to given object (at given position).

com/comref/full.arma2. Example: txt3 = lineBreak Category: OFP list trigger Operand types: trigger: Object Type of returned value: Array Description: Returns a list of units that would activate the given trigger. "OFF" and "AUTO" (auto means the lamp will be shining during the night automatically). Type of returned value: Nothing Description: Limit speed of given vehicle to given value (in km/h). Possible values are "ON".01 required.92 required. For a trigger of type "Not present" the list is the same as the list that would be returned for type "Present". Type of returned value: Structured text Description: Creates a structured text containing a line break. Category: OFP lineBreak Compatibility: Version 2.BIS Game Engine Scripting Commands Page 206 of 415 Type of returned value: String Description: Checks whether the lampost is turned on. http://www. Example: lightIsOn nearestObject [player. "StreetLamp"] != "OFF" Category: OFP object limitSpeed speed Operand types: object: Object speed: Number Compatibility: Version 2.html 7/11/2010 .

[[text.92 required...[[[]]. [value. [data.. Returns row index..arma2. Example: _index = lnbAddRow [idc..]. Type of returned value: Number Description: Adds list of rows of strings. Example: ln 10 ..].. result is 2.]]: Array Compatibility: Version 5501 required.[[[text. [[text..[[]]]] ..]] Operand types: [IDC.text]. Category: Editor ln x Operand types: x: Number Type of returned value: Number Description: The natural logarithm of x. [value.302 Category: Default lnbAddArray [IDC..text]. [data.]]. [value. [value.com/comref/full.text]..]].BIS Game Engine Scripting Commands Page 207 of 415 Example: list triggerOne Category: OFP map listObjects type Operand types: map: Control type: String Compatibility: Version 2. [data.. http://www.[[[text...html 7/11/2010 . [data.]].text]. Type of returned value: Array Description: Return the list of all objects of given type.].]]..]..

50 required. It returns the index of the newly added item. Type of returned value: Number Description: Adds an item with the given text to the given listbox or combobox. Type of returned value: Number Description: Adds an column at given position. 0. Example: http://www..8] Category: Resistance control lnbAddColumn position Operand types: control: Control position: Number Compatibility: Version 5501 required. text.arma2.. Example: _index = lnbAddColumn [105. [text. position]: Array Compatibility: Version 1. text.]]: Array Compatibility: Version 5501 required. Type of returned value: Number Description: Adds an row of strings.. Example: _index = _control lbAdd "First item" Category: OFP PC lnbAddRow [idc...com/comref/full.html 7/11/2010 . [text.]] Operand types: [idc. It returns the index of the newly added column. position] Operand types: [idc.BIS Game Engine Scripting Commands Page 208 of 415 Category: Resistance lnbAddColumn [idc..

] Category: OFP PC lnbClear idc Operand types: idc: Number Compatibility: Version 5501 required. It returns the index of the newly added row.. Type of returned value: Nothing Description: Clears all items in the given listbox or combobox. http://www.. Type of returned value: Nothing Description: Clears all items in the 2D listbox. Returns row index.] Operand types: control: Control [text1. Type of returned value: Number Description: Adds an row to the end od 2d listbox .]]. Example: lnbClear 101 Category: Resistance lnbClear control Operand types: control: Control Compatibility: Version 2.com/comref/full. Category: Resistance control lnbAddRow [text1... "second column".. ...91 required...t3..]: Array Compatibility: Version 5501 required.html 7/11/2010 .t2.text2.arma2.text2..BIS Game Engine Scripting Commands Page 209 of 415 _index = lnbAddRow [105. ["First column". Example: _index = _control lnbAdd [t1.

The color is returned in format Color. column]: Array Compatibility: Version 5501 required. Example: _color = _control lnbColor [row. column] Operand types: control: Control [row. column] Category: OFP PC lnbCurSelRow control Operand types: control: Control Compatibility: Version 2.com/comref/full.91 required. Example: _color = lnbColor [101. [0. Type of returned value: Number Description: http://www. [row. [row. Type of returned value: Array Description: Returns the text color of the item with the given position of the 2D listbox. Type of returned value: Array Description: Returns the text color of the item with the given position of the given 2D listbox.arma2.html 7/11/2010 . column] Operand types: [idc.BIS Game Engine Scripting Commands Page 210 of 415 Example: lbClear _control Category: OFP PC lnbColor [idc.1]] Category: Resistance control lnbColor [row. column]: Array Compatibility: Version 5501 required.

[row.1]] Category: Resistance control lnbData [row. column] Operand types: control: Control [row. Example: _data = lnbData [101. column]: Array Compatibility: Version 5501 required. Type of returned value: String Description: Returns the additional text (invisible) in an item with the given position of the 2D listbox. column]: Array Compatibility: Version 5501 required. Type of returned value: Number Description: Returns the index of the selected row id 2D listbox. Type of returned value: String http://www.BIS Game Engine Scripting Commands Page 211 of 415 Returns the index of the selected item of the given listbox or combobox. column] Operand types: [idc.arma2. Example: _row = lnbCurSel 105 Category: Resistance lnbData [idc. Example: _index = lbCurSel _control Category: OFP PC lnbCurSelRow idc Operand types: idc: Number Compatibility: Version 5501 required. [0.html 7/11/2010 . [row.com/comref/full.

Example: _data = _control lnbData [row. index]: Array Compatibility: Version 1. column] Category: OFP PC lnbDeleteColumn [idc. index] Operand types: [idc. Example: _control lbDelete 0 Category: OFP PC lnbDeleteRow [idc.com/comref/full. Example: lnbDeleteColumn [101.arma2. index] Operand types: [idc.html 7/11/2010 . Type of returned value: http://www. index]: Array Compatibility: Version 5501 required.50 required. Type of returned value: Nothing Description: Removes column with given index. Type of returned value: Nothing Description: Removes the item with the given index from the given listbox or combobox.BIS Game Engine Scripting Commands Page 212 of 415 Description: Returns the additional text (invisible) in an item with the given position of the given 2D listbox. 0] Category: Resistance control lnbDeleteColumn index Operand types: control: Control index: Number Compatibility: Version 5501 required.

Type of returned value: Nothing Description: Removes row with the given index from the given listbox or combobox.html 7/11/2010 . http://www.arma2. 0] Category: Resistance control lnbDeleteRow row Operand types: control: Control row: Number Compatibility: Version 5501 required. Example: lnbDeleteRow [105.91 required. Type of returned value: Array Description: Returns the index of the selected item of the given listbox or combobox. Example: _control lnbDelete 0 Category: OFP PC lnbGetColumnsPosition control Operand types: control: Control Compatibility: Version 2.BIS Game Engine Scripting Commands Page 213 of 415 Nothing Description: Removes row with given index from the 2D listbox.com/comref/full. Example: _index = lbCurSel _control Category: OFP PC lnbGetColumnsPosition idc Operand types: idc: Number Compatibility: Version 5501 required.

[row.BIS Game Engine Scripting Commands Page 214 of 415 Type of returned value: Array Description: Returns the columns position in 2D listbox. column]: Array Compatibility: Version 5501 required. Example: _picture = _control lnbPicture [row.html 7/11/2010 . [row. [row. column]: Array Compatibility: Version 5501 required. column] Operand types: control: Control [row. column] Category: OFP PC lnbSetColor [idc.arma2. column] Operand types: [idc. column]. [row. Example: _n = lnbGetColumnsSize 105 Category: Resistance lnbPicture [idc. color] Operand types: [idc. Type of returned value: String Description: Returns the picture name of the item with the given position of the 2D listbox. color]: Array Compatibility: http://www.com/comref/full. [0.1]] Category: Resistance control lnbPicture [row. Type of returned value: String Description: Returns the picture name of the item with the given position of the given listbox or combobox. column]. Example: _picture = lnbPicture [101.

column]. color] Operand types: control: Control [[row. Type of returned value: Nothing Description: Sets the text color of the item with the given position of the given 2D listbox .] Operand types: http://www. Type of returned value: Nothing Description: Sets the additional text (invisible) in the item with the given position of the 2D listbox. Color is in format Color. 0. column]. data]: Array Compatibility: Version 5501 required.. Color is in format Color. [0.com/comref/full.arma2. "#1"] Category: Resistance control lnbSetColumnsPos [pos1.html 7/11/2010 . 1.1].. column]. [0. 0. Type of returned value: Nothing Description: Sets the color of the item with the given position of the 2D listbox.pos2. 0. [row.BIS Game Engine Scripting Commands Page 215 of 415 Version 5501 required. 0. 1. Example: _control lnbSetColor [[row. data] Operand types: [idc. Example: lnbSetColor [101.. Example: lnbSetData [101. column].5]] Category: OFP PC lnbsetColumnsPos [idc.5]] Category: Resistance control lnbSetColor [[row.1]. [row. color]: Array Compatibility: Version 5501 required. [0. [0. column].

pos2.. Type of returned value: Nothing Description: Selects the row with the given index of the 2D listbox. Type of returned value: Nothing Description: Set position of 2d listbox columns. Example: lnbSetCurSel [105. index] Operand types: [idc..html 7/11/2010 .pos2. Example: _control lbSetCurSel row Category: OFP PC lnbSetData [idc.arma2..] Category: OFP PC lnbSetCurSelRow [idc.. Type of returned value: Nothing Description: Selects the item with the given index of the given listbox or combobox. data] http://www. index]: Array Compatibility: Version 5501 required.]: Array Compatibility: Version 5501 required. column]. [row.com/comref/full. 0] Category: Resistance control lnbSetCurSelRow row Operand types: control: Control row: Number Compatibility: Version 5501 required..BIS Game Engine Scripting Commands Page 216 of 415 control: Control [pos1. Example: _control lbSetColumnsPos [pos1..

1]. [row. column].BIS Game Engine Scripting Commands Page 217 of 415 Operand types: [idc. "#1"] Category: Resistance control lnbSetData [[row. column]. Example: lnbSetPicture [101.com/comref/full. column]. "#1"] Category: OFP PC lnbSetPicture [idc. [row. Type of returned value: Nothing Description: Sets the additional text (invisible) in the item with the given position of the 2D listbox. column]. The picture is searched in the mission directory. Example: _control lnbSetData [[row.arma2. Type of returned value: Nothing Description: Sets the additional text (invisible) in the item with the given position of the given 2D listbox to the given data. Name is the picture name. [0. "iskoda"] Category: Resistance http://www. [row. column]. column]. Example: lnbSetData [101. data]: Array Compatibility: Version 5501 required. name]: Array Compatibility: Version 5501 required.1]. the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory). data]: Array Compatibility: Version 5501 required. name] Operand types: [idc.html 7/11/2010 . [0. data] Operand types: control: Control [[row. Type of returned value: Nothing Description: Sets the picture in the item with the given position of the 2D listbox.

[row. Type of returned value: Nothing Description: Sets the picture in the item with the given position of the given 2D listbox. column]. column]. text]: Array Compatibility: Version 5501 required. Example: lnbSetData [101. text] Operand types: control: Control [[row. data]: Array Compatibility: Version 5501 required. Example: _control lnbSetPicture [[row. "#1"] Category: Resistance control lnbSetText [[row. "#1"] http://www.1]. name]: Array Compatibility: Version 5501 required. data] Operand types: [idc.BIS Game Engine Scripting Commands Page 218 of 415 control lnbSetPicture [[row. Type of returned value: Nothing Description: Sets the additional text (invisible) in the item with the given position of the 2D listbox. column].html 7/11/2010 . Name is the picture name. name] Operand types: control: Control [[row. [row.arma2. the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory). The picture is searched in the mission directory. "iskoda"] Category: OFP PC lnbSetText [idc.com/comref/full. column]. [0. column]. column]. Example: _control lnbSetData [[row. Type of returned value: Nothing Description: Sets the additional text (invisible) in the item with the given index of the given 2D listbox to the given data. column]. column].

[0.html 7/11/2010 . [row.com/comref/full. Type of returned value: Array Description: Returns [X. value] Operand types: control: Control [[row. Type of returned value: Nothing Description: Sets the additional integer value in the item with the given position of the given 2D listbox to the given value.arma2. column]. value]: Array Compatibility: Version 5501 required. column]. column].Y] size of 2D listbox. [row.1]. 1] Category: Resistance control lnbSetValue [[row. Example: _control lnbSetValue [[row.BIS Game Engine Scripting Commands Page 219 of 415 Category: OFP PC lnbSetValue [idc. value] Operand types: [idc. Example: lnbSetValue [101. column]. Type of returned value: Nothing Description: Sets the additional integer value in the item with the position index of the 2D listbox. Example: http://www. column]. value]: Array Compatibility: Version 5501 required. 1] Category: OFP PC lnbSize idc Operand types: idc: Number Compatibility: Version 5501 required.

column]] Operand types: [idc. Example: _n = lbSize _control Category: OFP PC lnbText [idc. column]: Array Compatibility: Version 5501 required. [row. column] Operand types: control: Control [row.html 7/11/2010 . [0. column]]: Array Compatibility: Version 1. Example: _text = lnbText [101.50 required. Type of returned value: Array Description: Returns the number of items in the given listbox or combobox. Type of returned value: String Description: Returns the shown text in the item with the given position of the given 2D listbox.BIS Game Engine Scripting Commands Page 220 of 415 _n = lnbSize 105 Category: Resistance lnbSize control Operand types: control: Control Compatibility: Version 2. http://www.91 required. Type of returned value: String Description: Returns the shown text in the item with the given position of the 2D listbox.com/comref/full.1]] Category: Resistance control lnbText [row.arma2. [row.

column]: Array Compatibility: Version 5501 required.82 required. column] Category: OFP PC lnbValue [idc.com/comref/full. column] Operand types: [idc. column]: Array Compatibility: Version 5501 required. http://www. column] Category: OFP PC loadFile filename Operand types: filename: String Compatibility: Version 1.1]] Category: Resistance control lnbValue [row. [0. Type of returned value: Number Description: Returns the additional integer value in the item with the given position of the 2D listbox. Type of returned value: String Description: Returns the content of the given file. [row. Example: _value = lnbValue [101. column] Operand types: control: Control [row.arma2.BIS Game Engine Scripting Commands Page 221 of 415 Example: _text = _control lnbText [row. [row. Type of returned value: Number Description: Returns the additional integer value in the item with the given position of the given 2D listbox. Example: _value = _control lnbValue [row.html 7/11/2010 .

result is "if a>b then {a} else {b}" Category: OFP loadGame Compatibility: Version 5501 required. Example: player loadIdentity "playerIdentity" Category: Resistance map loadOverlay config Operand types: map: Control config: Config Compatibility: Version 2.BIS Game Engine Scripting Commands Page 222 of 415 Example: loadFile "myFunction. Type of returned value: Boolean Description: Loads person's identity from objects.sqf" .arma2. restart the mission. Category: Editor http://www.75 required.com/comref/full.html 7/11/2010 . Type of returned value: Nothing Description: Load a game from the autosave.sav file in campaign directory (from entry name). if failed. Type of returned value: Nothing Description: Creates the load overlay dialog for the specified type of overlay.92 required. Category: OFP person loadIdentity name Operand types: person: Object name: String Compatibility: Version 1.

arma2.sav file in campaign directory (from entry name).BIS Game Engine Scripting Commands Page 223 of 415 object loadStatus name Operand types: object: Object name: String Compatibility: Version 1.html 7/11/2010 . In SP all objects are local. Note: all static objects are local on all computers. This can be used when one or more activation fields or scripts need to be performed only on one computer.com/comref/full. Type of returned value: Boolean Description: Loads object's properties from objects.75 required.csv file. Example: local unitName Category: OFP localize stringName Operand types: stringName: String Type of returned value: String Description: Replaces the string with the given name with the corresponding localized text from the stringtable. Example: localize "STR_DN_FROG" Category: OFP http://www. Example: player loadStatus "playerState" Category: Resistance local obj Operand types: obj: Object Type of returned value: Boolean Description: MP: checks whether the given unit is local on the computer.

including itself. Type of returned value: Nothing http://www. Category: Location vehicle lock lock Operand types: vehicle: Object lock: Boolean Type of returned value: Nothing Description: Locks the vehicle (disables mounting / dismounting) for the player.90 required.arma2. Type of returned value: Array Description: Return position of given location.html 7/11/2010 . This value is not equal to anything. Type of returned value: Location Description: A non-existing location. Example: jeepOne lock true Category: OFP vehicle lockCargo lock Operand types: vehicle: Object lock: Boolean Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 224 of 415 locationNull Compatibility: Version 5501 required.com/comref/full. Category: Location locationPosition location Operand types: location: Location Compatibility: Version 2.

Category: OFP locked unit Operand types: unit: Object Type of returned value: Boolean Description: Checks whether the vehicle is locked for the player. If it's locked. Type of returned value: Nothing Description: Lock the driver position of the vehicle. lock]: Array Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 225 of 415 Description: Lock the all cargo positions of the vehicle. lock] Operand types: vehicle: Object [cargo index.html 7/11/2010 .arma2. Category: OFP vehicle lockCargo [cargo index. Type of returned value: Nothing Description: Lock the cargo position of the vehicle. the player cannot mount / dismount without an order. Category: OFP vehicle lockDriver lock Operand types: vehicle: Object lock: Boolean Compatibility: Version 5501 required.com/comref/full. Example: locked jeepOne Category: OFP http://www.

BIS Game Engine Scripting Commands Page 226 of 415 vehicle lockedCargo cargo index Operand types: vehicle: Object cargo index: Number Compatibility: Version 5501 required. lock]: Array Compatibility: Version 5501 required.com/comref/full. Category: OFP vehicle lockTurret [turret path. Category: OFP vehicle lockedTurret turret path Operand types: vehicle: Object turret path: Array Compatibility: Version 5501 required. Type of returned value: Boolean Description: Check whether driver position of the vehicle turret is locked.html 7/11/2010 .arma2. Category: OFP lockedDriver vehicle Operand types: vehicle: Object Compatibility: Version 5501 required. Type of returned value: Boolean Description: Check whether cargo position of the vehicle is locked. Type of returned value: Boolean Description: Check whether gunner position of the vehicle turret is locked. http://www. lock] Operand types: vehicle: Object [turret path.

result is 1 Category: Default unit(s) lookAt position Operand types: unit(s): Object or Array position: Object or Array Compatibility: Version 2. Type of returned value: Nothing Description: Control what the unit is looking at (target or position) (format Position) http://www. Category: OFP group lockWp lockWP Operand types: group: Object or Group lockWP: Boolean Type of returned value: Nothing Description: Disables switching to the next waypoint (the current waypoint will never complete while lockWp is used).BIS Game Engine Scripting Commands Page 227 of 415 Type of returned value: Nothing Description: Lock the gunner position of the vehicle turret. Example: groupOne lockWP true Category: OFP log x Operand types: x: Number Type of returned value: Number Description: The base-10 logarithm of x.html 7/11/2010 .40 required. Example: log 10 .arma2.com/comref/full. This is sometimes used during cut-scenes.

Type of returned value: Nothing Description: Adds the next frame to the map animation. zoom.arma2. http://www.com/comref/full. Type of returned value: Nothing Description: Center the map on. The format of frame is [time. Type of returned value: Array Description: Returns an array with the type names of all the vehicle's magazines. Category: Editor magazines vehicle Operand types: vehicle: Object Compatibility: Version 1. otherSoldier lookAt getMarkerPos "markerOne" Category: OFP map lookAtPos position Operand types: map: Control position: Array Compatibility: Version 2.27 required. and point the camera at.html 7/11/2010 . the format of position is Position2D. position].BIS Game Engine Scripting Commands Page 228 of 415 Example: someSoldier lookAt otherSoldier.92 required. the position. Example: magazines player Category: Resistance mapAnimAdd frame Operand types: frame: Array Compatibility: Version 1.75 required.

Category: OFP mapAnimCommit Compatibility: Version 1.BIS Game Engine Scripting Commands Page 229 of 415 Example: mapAnimAdd [1.27 required.html 7/11/2010 . Type of returned value: Nothing Description: Clears the map animation.com/comref/full.27 required. Type of returned value: Number http://www. Category: OFP mapAnimDone Compatibility: Version 1. getMarkerPos "anim1"] Category: OFP mapAnimClear Compatibility: Version 1. Type of returned value: Nothing Description: Plays the map animation. Type of returned value: Boolean Description: Checks whether the map animation has finished. 0.1. Category: OFP markerAlpha markerName Operand types: markerName: String Compatibility: Version 5501 required.arma2.27 required.

50 required.arma2. Type of returned value: Array http://www.92 required. Type of returned value: String Description: Gets the marker color. Example: markerColor "MarkerOne" Category: OFP markerDir markerName Operand types: markerName: String Compatibility: Version 2. Type of returned value: String Description: Gets the marker brush. Example: markerBrush "MarkerOne" Category: OFP markerColor markerName Operand types: markerName: String Compatibility: Version 1. Example: markerAlpha "MarkerOne" Category: OFP markerBrush name Operand types: name: String Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 230 of 415 Description: Gets the marker alpha. Note: this function is identical to getMarkerColor.com/comref/full.html 7/11/2010 . See setMarkerBrush. See setMarkerColor. See setMarkerAlpha.

com/comref/full.y].50 required. Type of returned value: Array http://www. Type of returned value: Array Description: Returns the marker positon in format [x. Note: this function is identical to getMarkerPos. See setMarkerShape.arma2. Type of returned value: String Description: Gets the marker shape.50 required. Example: markerShape "MarkerOne" Category: OFP markerSize markerName Operand types: markerName: String Compatibility: Version 1.html 7/11/2010 .z. Example: markerPos "markerOne" Category: OFP markerShape name Operand types: name: String Compatibility: Version 5501 required. See setMarkerDir. Example: markerDir "MarkerOne" Category: OFP markerPos markerName Operand types: markerName: String Compatibility: Version 1.BIS Game Engine Scripting Commands Page 231 of 415 Description: Gets the marker direction.

Type of returned value: String Description: Gets the type of the marker.arma2. Note: this function is identical to getMarkerSize.50 required.BIS Game Engine Scripting Commands Page 232 of 415 Description: Gets the marker size. See setMarkerText.html 7/11/2010 . Example: markerSize "MarkerOne" Category: OFP markerText markerName Operand types: markerName: String Compatibility: Version 2.92 required. See setMarkerType. See setMarkerSize. Example: markerText "MarkerOne" Category: OFP markerType markerName Operand types: markerName: String Compatibility: Version 1. Example: markerType "MarkerOne" Category: OFP a max b Operand types: a: Number b: Number Type of returned value: Number Description: http://www. Note: this function is identical to getMarkerType. Type of returned value: Array Description: Gets the marker text.com/comref/full.

com/comref/full.ext entries hierarchy.b Example: 3 min 2 . Type of returned value: Config Description: Return root of mission description.90 required.html 7/11/2010 . Category: OFP PC missionName Compatibility: Version 1. result is 3 Category: Default a min b Operand types: a: Number b: Number Type of returned value: Number Description: The smaller of a.80 required. result is 2 Category: Default missionConfigFile Compatibility: Version 2.BIS Game Engine Scripting Commands Page 233 of 415 The greater of a. Category: OFP missionNamespace http://www.b Example: 3 max 2 .arma2. Type of returned value: String Description: Returns the name of the current mission.

Type of returned value: Array Description: Converts position from object model space to world space. month. minute. result is 1 Category: Default object modelToWorld modelPos Operand types: object: Object modelPos: Array Compatibility: Version 2.80 required.arma2. second]. Note that the remainer is calculated in the real domain. Category: OFP a mod b Operand types: a: Number b: Number Type of returned value: Number Description: The remainder of a divided by b.BIS Game Engine Scripting Commands Page 234 of 415 Compatibility: Version 5501 required.92 required. hour.html 7/11/2010 . Category: OFP missionStart Compatibility: Version 1. day.com/comref/full. Type of returned value: Array Description: Returns the time of the mission start in format [year. Category: OFP http://www. Example: 3 mod 2 . Type of returned value: Namespace Description: Return the global namespace attached to mission.

. Example: morale leader player .+1). Type of returned value: Number Description: Checks a current morale level of the unit (-1.com/comref/full. (Immediately.5 Category: OFP group move pos Operand types: group: Object or Group pos: Array Type of returned value: Nothing Description: Creates a move waypoint on the given position (format Position) and makes it the currently active group waypoint.BIS Game Engine Scripting Commands Page 235 of 415 morale unit Operand types: unit: Object Compatibility: Version 5500 required. Example: soldierOne moveInCargo jeepOne Category: OFP http://www. without animation).arma2. Example: groupOne move getPos player Category: OFP soldier moveInCargo vehicle Operand types: soldier: Object vehicle: Object Type of returned value: Nothing Description: Moves the soldier into the vehicle's cargo position.html 7/11/2010 . result is 0.

BIS Game Engine Scripting Commands Page 236 of 415 soldier moveInCargo [vehicle. Example: soldierOne moveInCommander jeepOne Category: OFP soldier moveInDriver vehicle Operand types: soldier: Object vehicle: Object Type of returned value: Nothing Description: Moves the soldier into the vehicle's driver position.arma2. (Immediately. without animation). (Immediatetely.com/comref/full. CargoIndex] Operand types: soldier: Object [vehicle. Example: soldierOne moveInDriver jeepOne Category: OFP soldier moveInGunner vehicle Operand types: http://www. CargoIndex]: Array Type of returned value: Nothing Description: Moves the soldier into a vehicle's specified cargo position. (Immediately. without animation). without animation).html 7/11/2010 . Example: soldierOne moveInCargo jeepOne Category: OFP soldier moveInCommander vehicle Operand types: soldier: Object vehicle: Object Type of returned value: Nothing Description: Moves the soldier into the vehicle's commander position.

Category: Editor moveOut soldier Operand types: soldier: Object Compatibility: Version 5501 required.html 7/11/2010 . turret path]: Array Type of returned value: Nothing Description: Moves the soldier into the vehicle's turret. without animation). 0]] Category: OFP map moveObjectToEnd object Operand types: map: Control object: String Compatibility: Version 2. Example: soldierOne moveInTurret [tank.com/comref/full.92 required. (Immediately. http://www. Example: soldierOne moveInGunner jeepOne Category: OFP soldier moveInTurret [vehicle. without animation).arma2. [0. Type of returned value: Nothing Description: Shifts an editor object to the end of the objects array. turret path] Operand types: soldier: Object [vehicle. (Immediately.BIS Game Engine Scripting Commands Page 237 of 415 soldier: Object vehicle: Object Type of returned value: Nothing Description: Moves the soldier into the vehicle's gunner position. This means that the object will be drawn last (after all other objects).

html 7/11/2010 . Type of returned value: Boolean Description: Check if latest low level moveTo command is finished.com/comref/full. Category: OFP moveTime soldier Operand types: soldier: Object Compatibility: Version 5500 required.62 required. Type of returned value: Number Description: Returns the current time of the most important RTM animation currently being played on the soldier. Type of returned value: Nothing Description: Low level command to person to move to given position. http://www.arma2. Category: OFP moveToCompleted person Operand types: person: Object Compatibility: Version 2.61 required.BIS Game Engine Scripting Commands Page 238 of 415 Type of returned value: Nothing Description: Moves the soldier out of vehicle. (Immediately. Example: moveTime player Category: OFP PC person moveTo position Operand types: person: Object position: Array Compatibility: Version 2. without animation).

the name of the first crew member is returned (in order: commander. driver. Example: name vehicle player Category: OFP name location Operand types: location: Location Compatibility: Version 2. When used on a vehicle.arma2.com/comref/full. gunner). http://www. Category: OFP name object Operand types: object: Object Type of returned value: String Description: Returns the name of the variable assigned to the object in the mission editor. Category: OFP musicVolume Type of returned value: Number Description: Checks the current music volume (set by fadeMusic).90 required.92 required. Type of returned value: Boolean Description: Check if latest low level moveTo command failed.html 7/11/2010 .BIS Game Engine Scripting Commands Page 239 of 415 Category: OFP moveToFailed person Operand types: person: Object Compatibility: Version 2.

. only entities of given type (or its subtype) are listed. typeName2.html 7/11/2010 . radius] or [[typeName1. Example: neareastBuilding player Category: OFP nearestLocation [position.arma2.90 required. If typeName(s) is (are) given. . radius] Operand types: position: Object or Array radius or [typeName. . Type of returned value: Location http://www. type] Operand types: [position.. radius] or [[typeName1. Type of returned value: Array Description: Find entities in the circle with given radius. Category: Location position nearEntities radius or [typeName.]. Example: _list = position player nearObjects 50 Category: OFP nearestBuilding obj Operand types: obj: Object Type of returned value: Object Description: Returns the nearest building to the given object.BIS Game Engine Scripting Commands Page 240 of 415 Type of returned value: String Description: Return name of global vatiable containing given location. typeName2.com/comref/full.. radius]: Compatibility: Version 5501 required..]. type]: Array Compatibility: Version 2.

92 required. <position to sort from>]: Array Compatibility: Version 2.html 7/11/2010 .y.z. <position to sort from>] Operand types: [position. [types]. Category: Location nearestLocations [position. "type"] or [object. within the specified distance. If <position to sort from> is provided. [types]. Pos may be using format [x.com/comref/full. "type"].arma2. locations will be ordered by distance from this point. Category: Location nearestObject pos Operand types: pos: Array Type of returned value: Object Description: Returns the nearest object of the given type to the given position or object. distance. Category: Location nearestLocationWithDubbing position Operand types: position: Array Compatibility: Version 5501 required. Example: nearestObject [player.BIS Game Engine Scripting Commands Page 241 of 415 Description: Find the nearest location (to the given position) of given type. Type of returned value: Location Description: Find the nearest location (to the given position) having it speech non-empty. Type of returned value: Array Description: Find the nearest locations (from the given position) of certain types. distance. "StreetLamp"] Category: OFP http://www.

01 required. ["Car".arma2..com/comref/full. Pos may be using format [x. limit] or [object.. Type of returned value: Object Description: Find object nearest to given position with given Visitor id.BIS Game Engine Scripting Commands Page 242 of 415 position nearestObject type Operand types: position: Array type: String Compatibility: Version 2. Example: obj = position player nearestObject 1234 Category: Resistance nearestObjects pos Operand types: pos: Array Compatibility: Version 2. limit]. Type of returned value: Object Description: Find object nearest to given position with given type. 200] Category: OFP http://www. Example: nearestObjects [player. Type of returned value: Array Description: Returns a list of nearest objects of the given types to the given position or object. ["type". ["type"..z.92 required.01 required. Example: obj = position player nearestObject "Building" Category: Resistance position nearestObject id Operand types: position: Array id: Number Compatibility: Version 2....y. within the specified distance.].html 7/11/2010 .]."Tank"].

Example: _ok = position player nearObjectsReady 50 Category: OFP position or object nearRoads radius Operand types: position or object: Object or Array radius: Number Compatibility: Version 5500 required. radius]: Compatibility: Version 2.arma2.com/comref/full.BIS Game Engine Scripting Commands Page 243 of 415 position nearObjects radius or [typeName.html 7/11/2010 . Type of returned value: Boolean Description: Check whether all data are loaded to nearObjects will return in reasonable time. Example: _list = position player nearObjects 50 Category: OFP position nearObjectsReady radius Operand types: position: Object or Array radius: Number Compatibility: Version 5501 required. only objects of given type (or its subtype) are listed. Type of returned value: Array Description: Find objects in the circle with given radius. Example: _list = player nearRoads 50 http://www. radius] Operand types: position: Object or Array radius or [typeName.92 required. If typeName is given. Type of returned value: Array Description: Find the road segments within the circle of given radius.

distance radius around it.92 required. side. Type of returned value: Nothing Description: Creates the new overlay dialog for the specified type of overlay. cost. Category: Editor nextMenuItemIndex map Operand types: http://www.BIS Game Engine Scripting Commands Page 244 of 415 Category: OFP unit nearTargets radius Operand types: unit: Object radius: Number Type of returned value: Array Description: Check target database of the unit for all targets in max. object] Category: OFP needReload vehicle Operand types: vehicle: Object Compatibility: Version 2.com/comref/full.html 7/11/2010 .arma2.92 required. The output is list of items: [position. type. Category: OFP map newOverlay config Operand types: map: Control config: Config Compatibility: Version 2. subj. Type of returned value: Number Description: Return how much vehicle wants to reload its weapons.

arma2.92 required.92 required. Type of returned value: Number Description: Return the time (in seconds) when the next weather change will occur. Category: Editor http://www. Example: variableToDestroy = nil Category: Default map nMenuItems menu index Operand types: map: Control menu index: Compatibility: Version 2. This value can be used to undefine an existing variable. Type of returned value: Number Description: Returns the next available menu item index. Category: Editor nextWeatherChange Compatibility: Version 2.com/comref/full.92 required. Category: OFP nil Type of returned value: Any Description: Nil value. Type of returned value: Number Description: Returns the total number of user-added menu items belonging to the given menu.BIS Game Engine Scripting Commands Page 245 of 415 map: Control Compatibility: Version 2.html 7/11/2010 .

time] Operand types: [year.5324] Category: OFP objNull Type of returned value: Object Description: A non-existing object.BIS Game Engine Scripting Commands Page 246 of 415 not a Operand types: a: Boolean Type of returned value: Boolean Description: not a Example: not false . including itself.com/comref/full. Example: date = NumberToDate [2008. result is true Category: Default NumberToDate [year.arma2.0.html 7/11/2010 . result is false Category: OFP objective objStatus status Operand types: objective: String status: String Type of returned value: http://www. This value is not equal to anything. Example: player == objNull .time]: Array Compatibility: Version 5501 required. Type of returned value: Array Description: Convert float number to date.

Example: onBriefingGroup "GroupVoiceOver" Category: Resistance onBriefingNotes sound Operand types: sound: String Compatibility: Version 1. "DONE" or "HIDDEN". Example: onBriefingNotes "NotesVoiceOver" Category: Resistance onBriefingPlan sound Operand types: sound: String http://www. Type of returned value: Nothing Description: Defines a sound (voice) that is played the first time when the Group section in the briefing is selected.75 required. Status may be one of: "ACTIVE". "FAILED".arma2. Type of returned value: Nothing Description: Defines a sound (voice) that is played the first time when the Notes section in the briefing is selected.BIS Game Engine Scripting Commands Page 247 of 415 Nothing Description: Sets the briefing objective status.com/comref/full.75 required.html 7/11/2010 . Example: "obj_1" objStatus "FAILED" Category: OFP onBriefingGroup sound Operand types: sound: String Compatibility: Version 1.

com/comref/full.75 required. Example: onBriefingPlan "PlanVoiceOver" Category: Resistance onBriefingTeamSwitch sound Operand types: sound: String Compatibility: Version 2.html 7/11/2010 . Example: onBriefingTeamSwitch "TeamSwitchVoiceOver" Category: Resistance onCommandModeChanged command Operand types: command: Compatibility: Version 5501 required. Type of returned value: Nothing Description: Defines a sound (voice) that is played the first time when the Team switch section in the briefing is selected. Type of returned value: Nothing Description: Defines an action performed when commnad mode change.BIS Game Engine Scripting Commands Page 248 of 415 Compatibility: Version 1. Type of returned value: Nothing Description: Defines a sound (voice) that is played the first time when the Plan section in the briefing is selected.92 required. Command receives _isHighCommand bool Category: OFP map onDoubleClick command Operand types: map: Control http://www.arma2.

BIS Game Engine Scripting Commands Page 249 of 415 command: String Compatibility: Version 2. Type of returned value: Nothing Description: Defines an action performed when palyer clicked on group marker (3D or in a map) Category: OFP onGroupIconOverEnter command Operand types: command: Compatibility: Version 5501 required.arma2. Type of returned value: Nothing Description: Defines an action performed when palyer clicked on group marker (3D or in a map) Category: OFP onGroupIconOverLeave command Operand types: command: Compatibility: Version 5501 required.html 7/11/2010 . Command receives: _pos array position _units array selected units _shift.92 required. Type of returned value: Nothing http://www.com/comref/full._alt bool key state Category: Editor onGroupIconClick command Operand types: command: Compatibility: Version 5501 required. Type of returned value: Any Description: Defines an action performed when the user double clicks on the map.

Type of returned value: Nothing Description: Defines an action performed when HC group has been selected. Command receives _group group selected group _isSelected bool new selection state Category: OFP onMapSingleClick command Operand types: command: Compatibility: Version 1. Example: onMapSingleClick """SoldierEG"" createUnit [_pos.html 7/11/2010 .com/comref/full.arma2. group player]" Category: Resistance parameters onMapSingleClick command Operand types: parameters: Any command: Compatibility: http://www.91 required. command should return true._alt bool key state If the click is processed. Command receives: _pos array position _units array selected units _shift. Type of returned value: Nothing Description: Defines an action performed when the user clicks on the map.BIS Game Engine Scripting Commands Page 250 of 415 Description: Defines an action performed when palyer clicked on group marker (3D or in a map) Category: OFP onHCGroupSelectionChanged command Operand types: command: Compatibility: Version 5501 required.

Type of returned value: Nothing Description: This statement is launched whenever a player is disconnected from a MP session. Category: Resistance onPreloadFinished command http://www. command should return true. Command receives: _pos array position _units array selected units _shift. Type of returned value: Nothing Description: Defines an action performed when the user clicks on the map. Variables _id and _name are set. Category: Resistance onPlayerDisconnected statement Operand types: statement: Compatibility: Version 2. group player]" Category: OFP onPlayerConnected statement Operand types: statement: Compatibility: Version 2. Variables _id and _name are set.arma2._alt bool key state _this any parameters passed to this function If the click is processed.com/comref/full. Example: "SoldierEG" onMapSingleClick "_this createUnit [_pos.10 required. Type of returned value: Nothing Description: This statement is launched whenever a player is connected to a MP session.html 7/11/2010 .BIS Game Engine Scripting Commands Page 251 of 415 Version 5500 required.10 required.

Category: OFP map onShowNewObject command Operand types: map: Control command: String Compatibility: Version 2.BIS Game Engine Scripting Commands Page 252 of 415 Operand types: command: Compatibility: Version 5501 required. Type of returned value: http://www.arma2. Set to empty for default behavior.html 7/11/2010 .92 required. Type of returned value: Any Description: Defines an action performed when the user right clicks on the map and selects New Object. Type of returned value: Nothing Description: Defines an action performed just before the preload screen started. Command receives: _pos array position Category: Editor onTeamSwitch command Operand types: command: Compatibility: Version 5500 required. Type of returned value: Nothing Description: Defines an action performed after the preload screen finished. Category: OFP onPreloadStarted command Operand types: command: Compatibility: Version 5501 required.com/comref/full.

Example: [unitOne. Type of returned value: Number Description: http://www. Command receives: _from object previous unit _to object current units Category: OFP a or b Operand types: a: Boolean b: Boolean Type of returned value: Boolean Description: a or b Example: not alive player or not alive leader player Category: Default unitArray orderGetIn order Operand types: unitArray: Array order: Boolean Type of returned value: Nothing Description: Forces all units in the list to get in their assigned vehicle. unitTwo] orderGetIn true Category: OFP overcast Compatibility: Version 2.92 required.com/comref/full.BIS Game Engine Scripting Commands Page 253 of 415 Nothing Description: Defines an action performed when the team switch is finished.arma2.html 7/11/2010 .

92 required.BIS Game Engine Scripting Commands Page 254 of 415 Return the current overcast. Type of returned value: Number Description: On server machine.html 7/11/2010 .com/comref/full. Type of returned value: Number Description: Parse string containing real number. Category: OFP parseNumber string Operand types: string: String Compatibility: Version 2. Otherwise return 0. Category: OFP owner object Operand types: object: Object Compatibility: Version 5501 required. Category: OFP overcastForecast Compatibility: Version 2.92 required. return the ID of the client where the object is local.125" Category: Default parseText text http://www. Type of returned value: Number Description: Return the overcast forecast.arma2. Example: parseNumber "0.

html 7/11/2010 . Type of returned value: Namespace Description: Return the global namespace attached to config parser.&ltbr/&gt. Type of returned value: Structured text Description: Creates a structured text by parsing the given XML description. result is 3. Example: txt = parseText "First line&lt.75 required.1415 Category: Default pickWeaponPool obj Operand types: obj: Object Compatibility: Version 1.com/comref/full.paa/&gt.BIS Game Engine Scripting Commands Page 255 of 415 Operand types: text: String Compatibility: Version 2.Second line" Category: OFP parsingNamespace Compatibility: Version 5501 required.01 required.img image=data\isniper. http://www. Type of returned value: Nothing Description: Transfers weapons and magazines from the cargo space of object obj to the weapon pool (used in campaigns to transfer weapons to the next mission). Category: OFP pi Type of returned value: Number Description: pi (180 degrees converted to radians) Example: pi .arma2.

a smooth transition to the given action will be initiated.com/comref/full.BIS Game Engine Scripting Commands Page 256 of 415 Category: Resistance playableUnits Compatibility: Version 5501 required.html 7/11/2010 . Category: OFP soldier playAction action Operand types: soldier: Object action: String Compatibility: Version 5500 required. Example: soldierOne playAction "SitDown" Category: OFP soldier playActionNow action Operand types: soldier: Object action: String Compatibility: Version 5501 required. but all previous playAction are discarded. a smooth transition to the given action will be initiated. Type of returned value: Nothing Description: When used on a person. Type of returned value: Array Description: Return a list of playable units (occupied by both AI or players). Example: soldierOne playActionNow "SitDown" Category: OFP http://www.arma2. Type of returned value: Nothing Description: When used on a person.

Type of returned value: Number Description: Return the player remaining time to respawn.09 required.80 required. Category: OFP playersNumber side Operand types: side: Side Compatibility: Version 1.com/comref/full. Example: alive player Category: OFP playerRespawnTime Compatibility: Version 2.92 required. Type of returned value: Side Description: Returns the player's side.BIS Game Engine Scripting Commands Page 257 of 415 player Type of returned value: Object Description: This is the person controlled by the player. Type of returned value: Number Description: Returns the number of players playing on the given side. http://www.html 7/11/2010 . Category: OFP playerSide Compatibility: Version 2.arma2. This is valid even when the player controlled person is dead (a difference from player side). In MP this value is different on each computer.

mission. If the campaign is empty. Example: playMission["XOutrage". Example: http://www. mission] or [campaign. Type of returned value: Nothing Description: The mission is launched (from the main menu). skipBriefing]: Array Compatibility: Version 2."x05Negotiator. Type of returned value: Nothing Description: When used on a person.html 7/11/2010 . a smooth transition to the given move will be initiated. Example: soldierOne playGesture "Wave" Category: OFP playMission [campaign.19 required. mission] or [campaign.arma2.com/comref/full. If skipBriefing is true.Noe"] Category: OFP soldier playMove moveName Operand types: soldier: Object moveName: String Type of returned value: Nothing Description: When used on a person. a single mission is launched. mission. the intro and briefing are skipped. a smooth transition to the given move will be initiated. Both campaign and mission are given as their directory name. skipBriefing] Operand types: [campaign.BIS Game Engine Scripting Commands Page 258 of 415 Category: OFP soldier playGesture moveName Operand types: soldier: Object moveName: String Compatibility: Version 5500 required.

Example: playMusic "musicname" http://www.html 7/11/2010 .com/comref/full. but all previous playAction are discarded. Example: soldierOne playMoveNow "Stand" Category: OFP playMusic nameAndPos Operand types: nameAndPos: Array Type of returned value: Nothing Description: Plays music defined in the description.arma2. a smooth transition to the given move will be initiated.BIS Game Engine Scripting Commands Page 259 of 415 soldierOne playMove "Stand" Category: OFP soldier playMoveNow moveName Operand types: soldier: Object moveName: String Compatibility: Version 5501 required.ext file. Type of returned value: Nothing Description: When used on a person. Example: playMusic ["Track13". The format of nameAndPos is [name. 30] Category: OFP playMusic name Operand types: name: String Type of returned value: Nothing Description: Plays music defined in the description.position]. Position is in seconds.ext file.

BIS Game Engine Scripting Commands Page 260 of 415 Category: OFP playScriptedMission [world. expression. config] Operand types: [world. Example: position player Category: OFP http://www. Type of returned value: Nothing Description: Load the given world. config]: Array Compatibility: Version 5500 required.arma2.ext for this mission. launch an empty mission and execute the given expression.com/comref/full.ext file. Category: OFP playSound name Operand types: name: String Type of returned value: Nothing Description: Plays a sound defined in the description.html 7/11/2010 . Example: playSound "soundname" Category: OFP position object Operand types: object: Object Compatibility: Version 1.50 required. Config (optional) can reference to the config entry replacing description. Type of returned value: Array Description: Returns the object position in format Position. expression.

Type of returned value: Array Description: Convert screen coordinates in map to world coordinates. Type of returned value: Array Description: Transform position from camera coordinate space to world coordinate space. Example: _worldPos = positionCameraToWorld _cameraPos Category: OFP PC map posScreenToWorld [x. Category: Location positionCameraToWorld position Operand types: position: Array Compatibility: Version 2.com/comref/full. y] Operand types: map: Control [x. Category: OFP PC map posWorldToScreen position Operand types: map: Control position: Array http://www. y]: Array Compatibility: Version 2.arma2.90 required.html 7/11/2010 . Type of returned value: Array Description: Return (raw) position of given location.BIS Game Engine Scripting Commands Page 261 of 415 position location Operand types: location: Location Compatibility: Version 2.54 required.52 required.

0.0075. 0.arma2. Type of returned value: Array Description: Convert world coordinates to screen coordinates in map.0075. Type of returned value: Nothing Description: Adjust parameters for specified post process effect Example: "radialBlurr" ppEffectEnable [] Category: Visual array ppEffectCommit scalar Operand types: array: Array scalar: Number http://www.html 7/11/2010 .92 required. Type of returned value: Nothing Description: Set post process effect parameters Example: hndl ppEffectAdjust [0.com/comref/full.54 required. 0. Category: OFP PC number ppEffectAdjust array Operand types: number: Number array: Array Compatibility: Version 2.1] Category: Visual string ppEffectAdjust array Operand types: string: String array: Array Compatibility: Version 2.1.BIS Game Engine Scripting Commands Page 262 of 415 Compatibility: Version 2.92 required.

Type of returned value: Nothing Description: Set time when old pars are replaced by last set.html 7/11/2010 .. if 0 set immediately Example: hndl ppEffectCommit 0 Category: Visual number ppEffectCommit number Operand types: number: Number number: Number Compatibility: Version 2.com/comref/full. Type of returned value: Nothing Description: Set time when old pars are replaced by last set. if 0 set immediately Example: hndl ppEffectCommit 0 Category: Visual string ppEffectCommit number Operand types: string: String number: Number Compatibility: Version 2..arma2.92 required. Type of returned value: Nothing Description: Set time when old pars are replaced by last set. if 0 set immediately Example: .92 required.BIS Game Engine Scripting Commands Page 263 of 415 Compatibility: Version 2.92 required. Category: Visual ppEffectCommitted effect http://www.

arma2.BIS Game Engine Scripting Commands Page 264 of 415 Operand types: effect: Number Compatibility: Version 5501 required. Type of returned value: Boolean Description: Check whether given post process effect is commited Category: Visual ppEffectCommitted effect Operand types: effect: String Compatibility: Version 5501 required. Type of returned value: Number Description: Create post process effect specified by name and priority http://www. Type of returned value: Array Description: Create post process effect specified by name and priority Category: Visual ppEffectCreate effect Operand types: effect: Array Compatibility: Version 5501 required.com/comref/full.html 7/11/2010 . Type of returned value: Boolean Description: Check whether given post process effect is commited Category: Visual ppEffectCreate effect Operand types: effect: Array Compatibility: Version 5501 required.

Type of returned value: Nothing Description: Destroy post process effect given by handle Category: Visual number ppEffectEnable bool Operand types: number: Number bool: Boolean Compatibility: Version 2.arma2.com/comref/full.BIS Game Engine Scripting Commands Page 265 of 415 Category: Visual ppEffectDestroy effect Operand types: effect: Array Compatibility: Version 5501 required. Type of returned value: Nothing Description: Enable / disable post process effect Example: hndl ppEffectEnable true Category: Visual string ppEffectEnable bool http://www.92 required. Type of returned value: Nothing Description: Create post process effect specified by name and priority Category: Visual ppEffectDestroy effect Operand types: effect: Number Compatibility: Version 5501 required.html 7/11/2010 .

Example: "radialBlurr" ppEffectEnable true.92 required. ["chromAberration". is overloaded form multiple effects.92 required. Type of returned value: Nothing Description: Enable/disable specified post process effect.arma2. "radialBlurr"] ppEffectEnable true Category: Visual precision entity Operand types: entity: Object Compatibility: Version 2. Type of returned value: Number Description: Return the precision of the given entity. ["chromAberration".92 required. Category: OFP preloadCamera position Operand types: http://www. is overloaded form multiple effects. Example: "radialBlurr" ppEffectEnable true.html 7/11/2010 .com/comref/full. "radialBlurr"] ppEffectEnable true Category: Visual array ppEffectEnable bool Operand types: array: Array bool: Boolean Compatibility: Version 2.BIS Game Engine Scripting Commands Page 266 of 415 Operand types: string: String bool: Boolean Compatibility: Version 2. Type of returned value: Nothing Description: Enable/disable specified post process effect.

Type of returned value: Boolean Description: Preload all textures and models around given position Category: OFP distance preloadObject object Operand types: distance: Number object: Object or String Compatibility: Version 2.BIS Game Engine Scripting Commands Page 267 of 415 position: Array Compatibility: Version 2.html 7/11/2010 . Category: OFP preloadTitleObj effect Operand types: effect: Array Type of returned value: Boolean Description: Object title .argument uses format ["text". Type of returned value: Boolean Description: Preload all data for given object.50 required. Category: OFP preloadSound sound Operand types: sound: String Compatibility: Version 2."type". Speed is ignored. Preload data The object can be defined in the description.ext file."type"].50 required.50 required. Type of returned value: Boolean Description: Make sure sound can start playing without any delay once we need it.speed] or ["name". Example: http://www.arma2.com/comref/full.

arma2. Speed is ignored."plain"] Category: OFP preloadTitleRsc effect Operand types: effect: Array Type of returned value: Boolean Description: Resource title .html 7/11/2010 .sqf" . Type of returned value: String Description: Returns the preprocessed content of the given file. result is "if a>b then {a} else {b}" Category: OFP preprocessFileLineNumbers filename Operand types: filename: String Compatibility: Version 2.82 required. it supports comments using // or /* and */ and macros defined with #define. The preprocessor is C-like.speed] or ["name".BIS Game Engine Scripting Commands Page 268 of 415 titleObj ["BISLogo".ext file. Preload data The resource can be defined in the description.com/comref/full."type"]. Example: preprocessFile "myFunction. it supports comments using // or /* and */ and macros defined with #define. http://www. Example: titleRsc ["BIS". The preprocessor is C-like.argument uses format ["name"."type". "PLAIN"] Category: OFP preprocessFile filename Operand types: filename: String Compatibility: Version 1.58 required. Type of returned value: String Description: Returns the preprocessed content of the given file.

result is "if a>b then {a} else {b}" Category: OFP primaryWeapon vehicle Operand types: vehicle: Object Compatibility: Version 1.BIS Game Engine Scripting Commands Page 269 of 415 Example: preprocessFileLineNumbers "myFunction. Type of returned value: Number Description: Return the priority of the task. Type of returned value: String Description: Returns the name of the vehicle's primary weapon (an empty string if there is none). Type of returned value: Nothing Description: Introduces one or more local variables in the innermost scope. Category: Identity private variable Operand types: variable: String or Array Compatibility: Version 1.85 required.com/comref/full.sqf" .arma2. Category: Default http://www. Example: primaryWeapon player Category: Resistance priority task Operand types: task: Task Compatibility: Version 2.html 7/11/2010 .91 required.75 required.

BIS Game Engine Scripting Commands Page 270 of 415 processDiaryLink link Operand types: link: String Compatibility: Version 5500 required.arma2.33 required. Type of returned value: Nothing Description: Open the diary screen on the record specified by link.html 7/11/2010 .com/comref/full. http://www. Type of returned value: Nothing Description: If loading screen is show. Type of returned value: Nothing Description: Process commands stored using setVehicleInit. Type of returned value: Number Description: Returns the current position in the progress bar. 1]) Category: OFP progressPosition control Operand types: control: Control Compatibility: Version 5500 required. set progress bar to the given value (from interval [0. Category: OFP progressLoadingScreen progress Operand types: progress: Number Compatibility: Version 5501 required. Category: Identity processInitCommands Compatibility: Version 2.

34: Number. The following types are supported since 1. Type of returned value: Nothing Description: Sets the current position in the progress bar. http://www.arma2.com/comref/full. Type of returned value: Nothing Description: Transfers weapons and magazines from the weapon pool (used in campaigns to transfer weapons to the next mission) into the cargo space of object obj.92 required. Object and Group.BIS Game Engine Scripting Commands Page 271 of 415 Example: _pos = progressPosition _control Category: OFP PC control progressSetPosition pos Operand types: control: Control pos: Number Compatibility: Version 2. Only type Number is supported in versions 1.html 7/11/2010 .33 and before.75 required. Example: publicVariable "CTFscoreOne" Category: OFP putWeaponPool obj Operand types: obj: Object Compatibility: Version 1. Boolean. Example: _control sliderSetPosition 0 Category: OFP PC publicVariable varName Operand types: varName: String Type of returned value: Nothing Description: Broadcasts the variable value to all computers.

1415 Category: Default radioVolume http://www. result is 3.com/comref/full.arma2.75 required.html 7/11/2010 . Category: Resistance queryWeaponPool name Operand types: name: String Compatibility: Version 1. Category: Resistance rad x Operand types: x: Number Type of returned value: Number Description: Converts x from degrees to radians.75 required. Type of returned value: Number Description: Returns the number of weapons of type name in the weapon pool (used in campaigns to transfer weapons to the next mission).BIS Game Engine Scripting Commands Page 272 of 415 Category: Resistance queryMagazinePool name Operand types: name: String Compatibility: Version 1. Example: rad 180 . Type of returned value: Number Description: Returns the number of magazines of type name in the weapon pool (used in campaigns to transfer weapons to the next mission).

Type of returned value: String Description: Return the rank of the given unit.92 required. (0<=random<1) Example: random 1 Category: Default rank unit Operand types: unit: Object Compatibility: Version 2.92 required. Category: OFP rankId unit http://www.html 7/11/2010 . Type of returned value: Number Description: Return the current rain.BIS Game Engine Scripting Commands Page 273 of 415 Type of returned value: Number Description: Checks the current radio volume (set by setRadioVolume).arma2. Category: OFP random x Operand types: x: Number Type of returned value: Number Description: The random real value from 0 to x. Category: OFP rain Compatibility: Version 2.com/comref/full.

This rating is increased for killing enemies.BIS Game Engine Scripting Commands Page 274 of 415 Operand types: unit: Object Compatibility: Version 5500 required. Type of returned value: Boolean Description: Check if given location has rectangular shape. Category: OFP rating unit Operand types: unit: Object Type of returned value: Number Description: Checks the unit rating. Type of returned value: Array Description: http://www. decreased for killing friendlies and can be changed by a mission designer. Type of returned value: Number Description: Return the rank of the given unit for comparison.com/comref/full.90 required.arma2.html 7/11/2010 .91 required. Example: rating player Category: OFP rectangular location Operand types: location: Location Compatibility: Version 2. Category: Location registeredTasks teamMember Operand types: teamMember: Compatibility: Version 2.

arma2.92 required. Category: Identity teamMember registerTask entry name Operand types: teamMember: entry name: String Compatibility: Version 2.com/comref/full. Type of returned value: Boolean Description: Check whether magazine is reloaded whenever emptied.html 7/11/2010 . Category: OFP who remoteControl whom http://www. Type of returned value: Nothing Description: Reload all weapons.90 required.BIS Game Engine Scripting Commands Page 275 of 415 List all registered task types. Category: OFP reloadEnabled vehicle Operand types: vehicle: Object Compatibility: Version 2. Parameters are defined in the given config class (subclass of CfgTasks). Category: Identity reload vehicle Operand types: vehicle: Object Compatibility: Version 2.92 required. Type of returned value: Boolean Description: Register a new task type.

BIS Game Engine Scripting Commands Page 276 of 415 Operand types: who: Object whom: Object Compatibility: Version 5501 required. Type of returned value: Nothing Description: Removes the action with the given id.arma2. Example: player remoteControl gunner _uav Category: OFP unit removeAction index Operand types: unit: Object index: Number Compatibility: Version 1.html 7/11/2010 .com/comref/full.85 required. Example: player removeAction 0 Category: OFP object removeAllEventHandlers handlerType Operand types: object: Object handlerType: String Compatibility: Version 1. Example: player removeAllEventHandlers "killed" Category: OFP http://www.11 required. Type of returned value: Nothing Description: Removes all event handlers of the given type which were added by addEventHandler. Type of returned value: Nothing Description: Switch on remote control of the unit.

Example: removeAllItems player Category: OFP removeAllWeapons unit Operand types: unit: Object Type of returned value: Nothing Description: Removes all weapons from the unit. Type of returned value: Nothing Description: Removes all special items from the unit. Example: removeAllWeapons player Category: OFP map removeDrawIcon [object.html 7/11/2010 .92 required. param type] Operand types: map: Control http://www. string identifier]: Array Compatibility: Version 2. string identifier] Operand types: map: Control [object.com/comref/full.BIS Game Engine Scripting Commands Page 277 of 415 removeAllItems unit Operand types: unit: Object Compatibility: Version 5501 required. Category: Editor map removeDrawLinks [from. Type of returned value: Nothing Description: Removes an icon for an editor object.arma2.

html 7/11/2010 . Type of returned value: Nothing Description: Removes event handler added by addEventHandler. Pass an empty string as param type to remove all draw links for an object. Type of returned value: Nothing Description: Remove all drawn links for the given editor object for the given editor object type.com/comref/full. Index is returned by addEventHandler. all handler indices higher that the deleted one should be decremented. Category: Editor object removeEventHandler handler Operand types: object: Object handler: Array Compatibility: Version 1.85 required. Example: group removeGroupIcon id Category: OFP unit removeMagazine weaponName http://www.index]. Type of returned value: Nothing Description: Remove icon with given ID from group. Format of handler is [type.92 required.0] Category: OFP group removeGroupIcon icon ID Operand types: group: Group icon ID: Number Compatibility: Version 5501 required. Example: player removeEventHandler ["killed".arma2. When any handler is removed.BIS Game Engine Scripting Commands Page 278 of 415 [from. param type]: Array Compatibility: Version 2.

com/comref/full.92 required. Type of returned value: Nothing Description: Removes a previously added menu item. application behaviour is undefined. Category: Editor map removeMenuItem text of menu item to delete Operand types: map: Control http://www.html 7/11/2010 . Example: player removeMagazine "M16" Category: OFP unit removeMagazines weaponName Operand types: unit: Object weaponName: String Type of returned value: Nothing Description: Removes all magazines of the given type from the unit. Note: you may create invalid combinations by using this function.arma2. When doing so. application behaviour is undefined. Note: you may create invalid combinations by using this function. Example: player removeMagazines "M16" Category: OFP map removeMenuItem index of menu item to delete Operand types: map: Control index of menu item to delete: Number Compatibility: Version 2. When doing so.BIS Game Engine Scripting Commands Page 279 of 415 Operand types: unit: Object weaponName: String or Array Type of returned value: Nothing Description: Removes the magazine from the unit.

92 required. Note: you may create invalid combinations by using this function. Type of returned value: Nothing Description: Removes a previously added menu item. Category: Identity removeSwitchableUnit person Operand types: person: Object Compatibility: Version 2.arma2. Category: Editor person removeSimpleTask task Operand types: person: Object task: Task Compatibility: Version 5501 required. Type of returned value: Nothing Description: Remove a simple task from the list of simple tasks. Category: OFP unit removeWeapon weaponName Operand types: unit: Object weaponName: String Type of returned value: Nothing Description: Removes the weapon from the unit.BIS Game Engine Scripting Commands Page 280 of 415 text of menu item to delete: String Compatibility: Version 2.92 required.html 7/11/2010 . When doing so.com/comref/full. Type of returned value: Nothing Description: Remove a unit from the list of units available for team switch. application behaviour is undefined. http://www.

The version format is "Major. e.html 7/11/2010 .BIS Game Engine Scripting Commands Page 281 of 415 Example: player removeWeapon "M16" Category: OFP requiredVersion version Operand types: version: String Compatibility: Version 1. a warning message is shown and false is returned. "1.30". Example: requiredVersion "1.30" Category: OFP resistance Type of returned value: Side Description: The Resistance side.com/comref/full.75 required. Example: array resize 2 Category: Default http://www.21 required. This function can be used to add or remove elements from the array. Type of returned value: Nothing Description: Changes the array size.g.arma2. Type of returned value: Boolean Description: Checks whether the appropriate version of the application is available.Minor". Category: OFP array resize count Operand types: array: Array count: Number Compatibility: Version 1. If it's not.

count = 0] Operand types: vehicle: Object [delay = -1. It does not matter whether the group can know about the unit or not.52 required. Category: Editor group reveal unit Operand types: group: Object or Group unit: Object Type of returned value: Nothing Description: Reveals the unit to the group. Example: soldierOne reveal soldierTwo Category: OFP reversedMouseY http://www.ext is used.92 required. for example). Count tells how many respawns is processed (default unlimited). default respawnDelay from description.arma2. Example: car respawnVehicle [5. Delay is respawn delay.BIS Game Engine Scripting Commands Page 282 of 415 vehicle respawnVehicle [delay = -1.0. Type of returned value: Nothing Description: Restarts the mission editor camera (if it was deleted by a script.html 7/11/2010 . 3] Category: OFP restartEditorCamera map Operand types: map: Control Compatibility: Version 2.com/comref/full. count = 0]: Array Compatibility: Version 2. Type of returned value: Nothing Description: Set vehicle as respawnable in MP games.

Example: round -5.com/comref/full.html 7/11/2010 . result is -5 Category: Default runInitScript Compatibility: Version 2.sqs script.arma2. Type of returned value: Boolean Description: Return if mouse vertical axe is inverted. Category: OFP round x Operand types: x: Number Type of returned value: Number Description: The round value of x. Category: OFP roadsConnectedTo road segment Operand types: road segment: Object Compatibility: Version 5500 required.BIS Game Engine Scripting Commands Page 283 of 415 Compatibility: Version 5501 required. Type of returned value: Nothing Description: Launch init. Category: OFP http://www.25 . Type of returned value: Array Description: Find the road segments connected to the given road segment.33 required.

Type of returned value: Number Category: OFP SafeZoneX Compatibility: Version 5501 required.html 7/11/2010 . Type of returned value: Number Category: OFP SafeZoneY Compatibility: Version 5501 required.arma2.com/comref/full. Type of returned value: Number Category: OFP saveGame Type of returned value: Nothing Description: Creates an autosave game (used for Retry). http://www.BIS Game Engine Scripting Commands Page 284 of 415 SafeZoneH Compatibility: Version 5501 required. Type of returned value: Number Category: OFP SafeZoneW Compatibility: Version 5501 required.

92 required.sav file in campaign directory as entry name. Example: player saveIdentity "playerIdentity" Category: Resistance saveOverlay map Operand types: map: Control Compatibility: Version 2.arma2. Type of returned value: Nothing Description: Save the current overlay.BIS Game Engine Scripting Commands Page 285 of 415 Category: OFP person saveIdentity name Operand types: person: Object name: String Compatibility: Version 1.75 required.com/comref/full.sav file in campaign directory as entry name. http://www.75 required. Example: saveOverlay _map Category: Editor object saveStatus name Operand types: object: Object name: String Compatibility: Version 1. Type of returned value: Boolean Description: Saves person's identity to objects.html 7/11/2010 . Type of returned value: Boolean Description: Saves object's properties to objects.

it will also pefrorm the corresponding lipsync effect. Example: saveVar "varOne" Category: OFP savingEnabled Compatibility: Version 5501 required.arma2. target] say speechName Operand types: unit or [unit. If target is given.BIS Game Engine Scripting Commands Page 286 of 415 Example: player saveStatus "playerState" Category: Resistance saveVar varName Operand types: varName: String Type of returned value: Nothing Description: Saves the variable value into the global campaign space. The unit will play the given sound. The sound is defined in the description. Type of returned value: Boolean Description: Check if saving the game is enabled. target]: Object or Array speechName: Array Compatibility: Version 1.75 required. The variable is then available to all following missions in the campaign.html 7/11/2010 . the title is not shown. speed]. If the camera is not withing the given range.com/comref/full. Type of returned value: Nothing Description: The format of speechName is [sound.ext file. Category: OFP unit or [unit. titles will be written to the conversation history. maxTitlesDistance. If the unit is a person. maxTitlesDistance] or [sound. Category: OFP http://www.

titles will be written to the conversation history. only difference is sound played as 2D (mono) allways. target] say2D speechName Operand types: unit or [unit. Example: soldierOne say "speechId" Category: OFP unit or [unit. Example: soldierOne say "speechId" Category: OFP unit or [unit. target] say speechName Operand types: unit or [unit. target]: Object or Array speechName: String Compatibility: Version 5501 required.com/comref/full. If the unit is a person. Category: OFP http://www. it will also pefrorm the corresponding lipsync effect. Type of returned value: Nothing Description: Functionally same as Say. Type of returned value: Nothing Description: Functionally same as Say. only difference is sound played as 2D (mono) allways. The sound is defined in the description. target]: Object or Array speechName: Array Compatibility: Version 5501 required.html 7/11/2010 . target] say2D speechName Operand types: unit or [unit. target]: Object or Array speechName: String Type of returned value: Nothing Description: The unit will play the given sound.ext file. If target is given.arma2.BIS Game Engine Scripting Commands Page 287 of 415 unit or [unit.

Type of returned value: Nothing Description: Functionally same as Say. target]: Object or Array speechName: String Compatibility: Version 5501 required. target] say3D speechName Operand types: unit or [unit.BIS Game Engine Scripting Commands Page 288 of 415 unit or [unit. only difference is sound played as 3D allways. only difference is sound played as 3D allways. Example: soldierOne say "speechId" Category: OFP scopeName name Operand types: name: String Type of returned value: Nothing Description: defines name of current scope.html 7/11/2010 . Category: Default score unit Operand types: unit: Object Type of returned value: http://www.com/comref/full. Name is visible in debugger. target] say3D speechName Operand types: unit or [unit. Scope name can be defined only once per scope. Type of returned value: Nothing Description: Functionally same as Say. and name is also used as reference in some commands. target]: Object or Array speechName: Array Compatibility: Version 5501 required.arma2. Category: OFP unit or [unit.

Type of returned value: Array Description: Returns the position on landscape (in world coordinates) corresponding to the given point on screen (in UI coordinates). Category: OFP scriptDone script Operand types: script: Script Compatibility: Version 2. Type of returned value: Boolean Description: Check if script is already finished Category: OFP scriptName name Operand types: name: String Compatibility: Version 5501 required. Example: http://www.50 required. Type of returned value: Nothing Description: Assign a friendly name to the VM script thjis command is executed from.BIS Game Engine Scripting Commands Page 289 of 415 Number Description: MP: returns the unit's score.arma2.html 7/11/2010 .com/comref/full. Example: score unitOne Category: OFP screenToWorld position Operand types: position: Array Compatibility: Version 5501 required.

Launch preparation.com/comref/full. Note: nonintegral values are used to indicate a transition between states.Launched.arma2.No activity. 1 . this selects the first element of the array.BIS Game Engine Scripting Commands Page 290 of 415 scriptName "Trading" Category: Default scudState scud Operand types: scud: Object Compatibility: Version 1. Example: secondaryWeapon player Category: Resistance array select index Operand types: array: Array index: Boolean Type of returned value: Any Description: If the index is false. Type of returned value: String Description: Returns the name of a vehicle's secondary weapon (an empty string if there is none). Type of returned value: Number Description: Returns the current state of the given scud launcher. The following states are recognized: 0 .75 required.28 required. Example: scudState scudOne>=4 Category: OFP secondaryWeapon vehicle Operand types: vehicle: Object Compatibility: Version 1.html 7/11/2010 . 3 . it selects the second one. If it is true. http://www.Launch prepared. 2 .Ignition and 4 .

etc. Example: (configFile >> "CfgVehicles") select 0 Category: OFP PC array select index Operand types: array: Array index: Number Type of returned value: Any Description: Selects index element of the array.html 7/11/2010 .com/comref/full. 3] select 1 .BIS Game Engine Scripting Commands Page 291 of 415 Category: Default config select index Operand types: config: Config index: Number Compatibility: Version 2. Type of returned value: Array Description: Find the places with the max. value of _expression in the given area. 2. _precision. _sourcesCount]: Array Compatibility: Version 5500 required. _radius. result is 2 Category: Default selectBestPlaces [_position. Type of returned value: Config Description: Returns subentry with given index.35 required. _radius. Example: [1. Index 0 denotes the first element. _sourcesCount] Operand types: [_position.arma2. 1 the second. Category: OFP http://www. _expression. _precision. _expression.

com/comref/full. Type of returned value: Nothing Description: Select the subject page in a log. Category: Editor object selectionPosition selection name Operand types: object: Object selection name: String Compatibility: Version 2. http://www.92 required. Category: Identity selectedEditorObjects map Operand types: map: Control Compatibility: Version 2.92 required.html 7/11/2010 . Type of returned value: Nothing Description: Returns a list of currently selected editor objects. Type of returned value: Any Description: Select an editor object. Category: Editor map selectEditorObject object Operand types: map: Control object: String Compatibility: Version 2. Does not un-select previously selected objects.92 required.arma2.BIS Game Engine Scripting Commands Page 292 of 415 person selectDiarySubject subject Operand types: person: Object subject: String Compatibility: Version 5500 required.

com/comref/full. Example: group player selectLeader player Category: OFP selectNoPlayer Compatibility: Version 5501 required. Category: OFP selectPlayer unit Operand types: unit: Object Compatibility: Version 2.33 required. Type of returned value: Nothing Description: Switch player to given unit. Type of returned value: Nothing Description: Switch player to no unit. Example: http://www.BIS Game Engine Scripting Commands Page 293 of 415 Type of returned value: Array Description: Search for selection in the object model (first in the memory level. then in other levels).arma2.33 required.html 7/11/2010 . Returns position in model space. Type of returned value: Nothing Description: Select group leader. Category: OFP group selectLeader unit Operand types: group: Group unit: Object Compatibility: Version 2.

value2.26 required. . value1.html 7/11/2010 . parentTask]. name2.92 required. parentTask].] Operand types: sender: [receiver.. name1.arma2.27 required. value1. [type] or [type.. priority. value2. Example: soldierOne selectWeapon "LAWLauncher" Category: OFP object sendSimpleCommand command Operand types: object: Object command: String Compatibility: Version 2. Example: vehicle player sendSimpleCommand "STOP" Category: OFP sender sendTask [receiver.. For weapon values see CfgWeapons. name1..com/comref/full. Type of returned value: Nothing Description: Selects the given weapon.]: Array Compatibility: Version 2. priority. Type of returned value: Nothing Description: Sends a simple command to the vehicle's driver / gunner. . [type] or [type.BIS Game Engine Scripting Commands Page 294 of 415 selectPlayer aP Category: OFP unit selectWeapon weapon Operand types: unit: Object weapon: String Compatibility: Version 1. name2. Type of returned value: Task http://www.

index+1 is called to create it. Example: array set [0.arma2. Category: Identity task sendTaskResult [state. Category: OFP array set element Operand types: array: Array element: Array Compatibility: Version 1. result. Type of returned value: Nothing Description: Send a result of the task to the task sender. If the element does not exist. sentence] Operand types: task: Task [state.BIS Game Engine Scripting Commands Page 295 of 415 Description: Create a new AI task (subtask of parentTask). "Hello"] Category: Default http://www.html 7/11/2010 .92 required.com/comref/full. Type of returned value: Nothing Description: Format of element is [index. Type is name of registered task type. Changes an element of the given array. result. sentence]: Array Compatibility: Version 2. Category: Identity serverTime Compatibility: Version 5501 required. Type of returned value: Number Description: Server time synchronized to clients. value].75 required.

com/comref/full.html 7/11/2010 .arma2.92 required. Example: setAccTime 0. An amount of one indicates a full cargo. Ammo resources are used to resupply vehicles. Example: rearmTruckOne setAmmoCargo 0 Category: OFP http://www.1 Category: OFP airportId setAirportSide side Operand types: airportId: Number side: Side Compatibility: Version 2. soldiers use individual magazines instead.BIS Game Engine Scripting Commands Page 296 of 415 setAccTime accFactor Operand types: accFactor: Number Type of returned value: Nothing Description: Sets the time acceleration coeficient. Type of returned value: Nothing Description: Set owner of the airport Example: 0 setAirportSide east Category: OFP vehicle setAmmoCargo ammoCargo Operand types: vehicle: Object ammoCargo: Number Type of returned value: Nothing Description: Sets the amount of ammo resources in the cargo space of a repair vehicle. It can also be used to slow down time in cutscenes.

Category: OFP setArmoryPoints points Operand types: points: Number Compatibility: Version 5500 required.. value2.73 required. value2.paa"] Category: OFP group setBehaviour behaviour Operand types: group: Object or Group http://www. Category: OFP text setAttributes [name1. name2.BIS Game Engine Scripting Commands Page 297 of 415 setAperture set Operand types: set: Number Compatibility: Version 2.html 7/11/2010 . .]: Array Compatibility: Version 2... name2.] Operand types: text: Text or String [name1. "data\iSoldier.arma2. Type of returned value: Nothing Description: Sets custom camera apreture (-1 to do it automatically).01 required. Type of returned value: Structured text Description: Returns a structured text created by the given structured or plain text by setting attributes to the given values. value1. Example: txt = img setAttributes ["image". Type of returned value: Nothing Description: Store the given amount of armory points.. .com/comref/full. value1.

html 7/11/2010 . the vehicle commander is marked instead. Example: _soldier setCameraInterest 50 Category: OFP person setCaptive captive Operand types: person: Object captive: Type of returned value: Nothing Description: Marks the unit as captive. A captive is neutral to everyone.arma2.57 required.BIS Game Engine Scripting Commands Page 298 of 415 behaviour: String Type of returned value: Nothing Description: Sets the group behaviour mode.com/comref/full. Example: setCaptive player Category: OFP group setCombatMode mode Operand types: http://www. Note: This function does not remove the unit's weapons. "COMBAT" or "STEALTH". "SAFE". Example: groupOne setBehaviour "SAFE" Category: OFP entity setCameraInterest interest Operand types: entity: Object interest: Number Compatibility: Version 2. "AWARE". Behaviour is one of: "CARELESS". Type of returned value: Nothing Description: Set camera interest for given entity. If the unit is a vehicle.

engage at will). Type of returned value: Nothing Description: Switch the group to process the given waypoint. Mode can be one of: "BLUE" (Never fire). Example: groupOne setCombatMode "BLUE" Category: OFP person setCurrentTask task Operand types: person: Object task: Task Compatibility: Version 5501 required. Type of returned value: Nothing Description: Set the task as a current task of the person. Category: Identity group setCurrentWaypoint waypoint Operand types: group: Group waypoint: Array Compatibility: Version 5129 required.BIS Game Engine Scripting Commands Page 299 of 415 group: Object or Group mode: String Type of returned value: Nothing Description: Sets the group's combat mode (engagement rules).defend only). engage at will). "GREEN" (Hold fire . "WHITE" (Hold fire.com/comref/full.arma2.html 7/11/2010 . "YELLOW" (Fire at will) or "RED" (Fire at will. Category: OFP object setDamage damage Operand types: object: Object damage: Number Compatibility: http://www.

forceReplan] Operand types: object: Object [position.com/comref/full. Damage 0 means the object is fully functional. Example: player setdamage 1 Category: OFP obj setDammage dammage Operand types: obj: Object dammage: Number Type of returned value: Nothing Description: Damages / repairs the object. Damage 0 means the object is fully functional. damage 1 means it's completely destroyed / dead. Type of returned value: Nothing Description: Damages / repairs the object. minute] Operand types: [year.50 required. minute]: Array Compatibility: Version 1. damage 1 means it's completely destroyed / dead. planningMode. It was introduced to fix a spelling error in the original function name. Type of returned value: Nothing Description: Sets the actual mission date and time. day. Category: OFP object setDestination [position. month. Example: player setdammage 1 Category: OFP setDate [year. month.BIS Game Engine Scripting Commands Page 300 of 415 Version 1.html 7/11/2010 .arma2.86 required. day. hour. Note: this function is identical to setDammage. planningMode. forceReplan]: Array Compatibility: http://www. hour.

maintain size?. Type of returned value: Nothing Description: Set a new direction (angle) of given location. height. Category: Location map setDrawIcon [object. shadow. shadow. width.html 7/11/2010 . offset. is3D. angle. texture. offset.90 required.BIS Game Engine Scripting Commands Page 301 of 415 Version 2. The accepted heading range is from 0 to 360.92 required. color.arma2. Type of returned value: Nothing http://www. width.com/comref/full. Type of returned value: Nothing Description: Set the destination for path planning of the pilot. maintain size?. string identifier. color. Example: player setDir 180 Category: OFP location setDirection direction Operand types: location: Location direction: Number Compatibility: Version 2.92 required. height. Category: OFP obj setDir heading Operand types: obj: Object heading: Number Type of returned value: Nothing Description: Sets the object heading. draw line?. priority] Operand types: map: Control [object. is3D. priority]: Array Compatibility: Version 2. texture. draw line?. string identifier. angle.

3D or PREVIEW.arma2.subordinates also]: Array Compatibility: Version 2.92 required. is3D.condition. Category: Editor particleSource setDropInterval interval Operand types: particleSource: Object interval: Number Compatibility: Version 2. If maintain size is a number.com/comref/full. Type of returned value: Nothing Description: Sets map mode to MAP.05 Category: OFP map setEditorMode mode Operand types: map: Control mode: String Compatibility: Version 2. Type of returned value: Nothing Description: Set interval of emitting particles from particle source.editor type.editor type. icon will not scale depending on the scale of the map. Example: _source setDropInterval 0.condition.92 required.subordinates also] Operand types: map: Control [objects.html 7/11/2010 .56 required. Type of returned value: Nothing Description: http://www.scope.BIS Game Engine Scripting Commands Page 302 of 415 Description: Set the icon to be shown in 2D editor for the specified editor object. the icon will maintain size if map scale is below that number. Category: Editor map setEditorObjectScope [objects.scope. show line and priority are optional. If maintain size is false.

Type of returned value: Nothing Description: The statement is executed when the trigger or waypoint is activated and the effects are launched depending on the result. SELECT. LINKTO. Category: Editor trigger or waypoint setEffectCondition statement Operand types: trigger or waypoint: Object or Array statement: String Compatibility: Version 1. If the result is a boolean and true.arma2. the scope of the evaluated editor object will be modified. editor type is the editor type to effect (eg unit). objects is an array of either Editor Objects (eg [_unit_0]) or actual Game Objects (eg [player]). If the result is an array.vehicle.html 7/11/2010 . VIEW.HIDE.side effectiveCommander _x != side player.com/comref/full. condition is an executable string that must evaluate to true or false. Example: setFace "Face10" Category: OFP person setFaceanimation blink http://www. Example: trigger setEffectCondition "thisList" Category: OFP person setFace soldier Operand types: person: Object soldier: String Type of returned value: Nothing Description: Sets the person's face.86 required. LINKFROM. the effect was launched if the result contains the player or the player vehicle. ALLNOTREE or ALL. ALLNODRAG. if true then subordinates in the editor will be assigned the same scope as the parent. the effect was launched if the result is the player or the player vehicle. the effect was launched. If the result is an object.false]. If true. Example: _map setEditorObjectScope [[]. or for none.BIS Game Engine Scripting Commands Page 303 of 415 This command defines the level of access a user has to editor objects. If the array is empty then the command will automatically parse all editor objects. scope is one of HIDE. subordinates also is a boolean value.

Blink is in the range from 0 to 1.com/comref/full. Example: setFlagSide east Category: OFP flag setFlagTexture texture Operand types: flag: Object texture: String http://www. the flag is returned to the flagpole.arma2.html 7/11/2010 .5 Category: OFP flag setFlagOwner owner Operand types: flag: Object owner: Object Type of returned value: Nothing Description: Sets the flag owner. Example: setFaceAnimation 0. Example: setFlagOwner objNull Category: OFP flag setFlagSide side Operand types: flag: Object side: Side Type of returned value: Nothing Description: Sets the flag side.BIS Game Engine Scripting Commands Page 304 of 415 Operand types: person: Object blink: Number Type of returned value: Nothing Description: Sets the facial animation phase (eye blinking). When the owner is set to objNull.

Example: groupOne setFormation "LINE" Category: OFP object setFormationTask task Operand types: object: Object task: String http://www.html 7/11/2010 .pac" Category: OFP time setFog fog Operand types: time: Number fog: Number Type of returned value: Nothing Description: Changes the fog value smoothly during the given time (in seconds).5 Category: OFP group setFormation formation Operand types: group: Object or Group formation: String Type of returned value: Nothing Description: Sets the group formation. "ECH LEFT".BIS Game Engine Scripting Commands Page 305 of 415 Type of returned value: Nothing Description: Sets the flag texture. A fog level of zero is minimum fog and a fog level of one is maximum fog. If the texture is "". "WEDGE".arma2. Formation is one of: "COLUMN". the flag is not drawn. "STAG COLUMN". "VEE" or "LINE". "ECH RIGHT". A time of zero means there will be an immediate change. Example: 1800 setFog 0. Example: setFlagTexture "usa_vlajka.com/comref/full.

html 7/11/2010 . otherwise it's friendly.92 required.6 it results in being enemy. value]: Array Compatibility: Version 1. Category: OFP FSM handle setFSMVariable [name. Category: OFP group setFormDir heading Operand types: group: Object or Group heading: Number Type of returned value: Nothing Description: Sets the formation heading. For a value smaller than 0. Example: player setformdir 180 Category: OFP side1 setFriend [side2. Type of returned value: Nothing Description: Set the current task of the formation member. value] Operand types: FSM handle: Number [name. Type of returned value: Nothing Description: Sets how friendly side1 is with side2. The accepted heading range is from 0 to 360. The formation is facing this direction unless an enemy is seen. this value is overridden by the movement direction.com/comref/full. When the group is moving.86 required. value]: Array Compatibility: Version 5501 required. http://www.BIS Game Engine Scripting Commands Page 306 of 415 Compatibility: Version 2.arma2. value] Operand types: side1: Side [side2.

BIS Game Engine Scripting Commands Page 307 of 415 Type of returned value: Nothing Description: Set variable to given value in the variable space of given FSM. Type of returned value: Nothing http://www.com/comref/full.arma2. The FSM handle is the number returned by the execFSM command. Example: refuelTruckOne setFuelCargo 0 Category: OFP group setGroupIcon properties Operand types: group: Group properties: Array Compatibility: Version 5501 required.html 7/11/2010 . Example: jeepOne setFuel 0 Category: OFP vehicle setFuelCargo amount Operand types: vehicle: Object amount: Number Type of returned value: Nothing Description: Sets the fuel amount in the cargo space of a refuelling vehicle. Category: OFP vehicle setFuel amount Operand types: vehicle: Object amount: Number Type of returned value: Nothing Description: Sets the fuel amount. A fuel level of one is a full gas tank. A fuel level of one is a full gas tank.

arma2. [color.html 7/11/2010 .com/comref/full. Type of returned value: http://www. Example: selectableGroupIcons true Category: OFP setGroupIconsVisible array Operand types: array: Array Compatibility: Version 5501 required.show] Category: OFP setGroupIconsSelectable bool Operand types: bool: Boolean Compatibility: Version 5501 required.float.1]. Type of returned value: Nothing Description: Set group icons parameters.scale.BIS Game Engine Scripting Commands Page 308 of 415 Description: Set group icons properties. Type of returned value: Nothing Description: Sets if group icons raises onclick and onover events. Example: setGroupIcon[id."b_inf".string."text".[offsetX.bool] Example: group setGroupIconParams [[1.ofsetY]] Category: OFP group setGroupIconParams properties Operand types: group: Group properties: Array Compatibility: Version 5501 required.1.1.

arma2. damage]: Array Compatibility: Version 2. damage] Operand types: object: Object [part. Type of returned value: Nothing Description: It sets the data for hiding. Type of returned value: Nothing Description: http://www. Example: showGroupIcons [true. Category: OFP object setHit [part. nameParam1.true] Category: OFP group setGroupid [nameFomat. Category: OFP object setHideBehind [objectWhereHide.BIS Game Engine Scripting Commands Page 309 of 415 Nothing Description: Sets if group icons are visible. ObjectWhereHide can be taken using findCover. HidePosition can be taken using getHideFrom.] Operand types: group: Object or Group [nameFomat.]: Array Type of returned value: Nothing Description: Sets the group identity..html 7/11/2010 .30 required. hidePosition] Operand types: object: Object [objectWhereHide. nameFormat contains strings "%CLASS_NAME" where CLASS_NAME is name of class in CfgWorlds.com/comref/full.. .. hidePosition]: Array Compatibility: Version 2.92 required. nameParam1. parameters are names of subclasses of CLASS_NAME with the description of the name subpart. ..

ext file of the mission or campaign. 1] Category: OFP person setIdentity identity Operand types: person: Object identity: String Type of returned value: Nothing Description: Sets the identity of a person. Example: setIdentity "JohnDoe" Category: OFP location setImportance importance Operand types: location: Location importance: Number Compatibility: Version 2. Type of returned value: Nothing Description: Set a new importance of given location.90 required. b] Operand types: light: Object [r. g.58 required. Example: vehicle player setHit ["engine". g.com/comref/full.arma2. Type of returned value: Nothing Description: http://www. damage 1 means completely destroyed / dead. b]: Array Compatibility: Version 2. Damage 0 means fully functional. Category: Location light setLightAmbient [r.BIS Game Engine Scripting Commands Page 310 of 415 Damage / repair part of object.html 7/11/2010 . Identities are defined in the descripion.

html 7/11/2010 . Type of returned value: Nothing Description: Sets the marker alpha. Type of returned value: Nothing Description: Set brightness of light.58 required. The marker is modified on all computers in a network session.BIS Game Engine Scripting Commands Page 311 of 415 Set ambient color of light.com/comref/full. Type of returned value: Nothing Description: Set diffuse color of light. b] Operand types: light: Object [r.58 required. Example: "MarkerOne" setMarkerAlpha 0. Category: OFP marker setMarkerAlpha alpha Operand types: marker: String alpha: Number Compatibility: Version 5501 required. Category: OFP light setLightBrightness brightness Operand types: light: Object brightness: Number Compatibility: Version 2. g.arma2.5 Category: OFP http://www. b]: Array Compatibility: Version 2. Category: OFP light setLightColor [r. g.

http://www.html 7/11/2010 .BIS Game Engine Scripting Commands Page 312 of 415 marker setMarkerAlphaLocal alpha Operand types: marker: String alpha: Number Compatibility: Version 5501 required. Brush is the name of the subclass in CfgMarkerBrushes. Type of returned value: Nothing Description: Sets the marker alpha.arma2. Type of returned value: Nothing Description: Selects the fill texture for the marker ("RECTANGLE" or "ELLIPSE").com/comref/full.5 Category: OFP name setMarkerBrush brush Operand types: name: String brush: String Compatibility: Version 1. The marker is only modified on the computer where the command is called. Example: "MarkerOne" setMarkerAlpha 0. The marker is only modified on the computer where the command is called. Brush is the name of the subclass in CfgMarkerBrushes. Example: "Marker1" setMarkerBrush "DiagGrid" Category: OFP name setMarkerBrushLocal brush Operand types: name: String brush: String Compatibility: Version 2.86 required. Type of returned value: Nothing Description: Selects the fill texture for the marker ("RECTANGLE" or "ELLIPSE").92 required. The marker is modified on all computers in a network session.

The marker is modified on all computers in a network session.arma2. "ColorGreen". "ColorBlue". Example: "MarkerOne" setMarkerColor "ColorBlack" Category: OFP marker setMarkerColorLocal color Operand types: marker: String color: String Compatibility: Version 2.com/comref/full. "ColorBlack". Color is one of: "Default".BIS Game Engine Scripting Commands Page 313 of 415 Example: "Marker1" setMarkerBrushLocal "DiagGrid" Category: OFP marker setMarkerColor color Operand types: marker: String color: String Compatibility: Version 1. "ColorGreenAlpha". Example: "MarkerOne" setMarkerColorLocal "ColorBlack" Category: OFP name setMarkerDir angle Operand types: name: String angle: Number http://www. "ColorRedAlpha". "ColorBlack". "ColorBlue". Type of returned value: Nothing Description: Sets the marker color.html 7/11/2010 .21 required. Color is one of: "Default". "ColorRedAlpha". "ColorRed".92 required. "ColorGreen". "ColorRed". The marker is only modified on the computer where the command is called. "ColorYellow" or "ColorWhite". Type of returned value: Nothing Description: Sets the marker color. "ColorYellow" or "ColorWhite". "ColorGreenAlpha".

Example: "Marker1" setMarkerDir 90 Category: OFP name setMarkerDirLocal angle Operand types: name: String angle: Number Compatibility: Version 2.html 7/11/2010 . Type of returned value: Nothing Description: Sets the orientation of the marker.86 required.BIS Game Engine Scripting Commands Page 314 of 415 Compatibility: Version 1. Angle is in degrees. The marker is modified on all computers in a network session. The marker is only modified on the computer where the command is called.com/comref/full. The marker is modified on all computers in a network session. The format of pos is Position2D.arma2. Angle is in degrees. Type of returned value: Nothing Description: Sets the orientation of the marker. Example: "MarkerOne" setMarkerPos getMarkerPos "MarkerTwo" Category: OFP markerName setMarkerPosLocal pos http://www.92 required. Example: "Marker1" setMarkerDirLocal 90 Category: OFP markerName setMarkerPos pos Operand types: markerName: String pos: Array Type of returned value: Nothing Description: Moves the marker.

arma2.92 required. Type of returned value: Nothing Description: Moves the marker. The marker is only modified on the computer where the command is called. The marker is modified on all computers in a network session.92 required.BIS Game Engine Scripting Commands Page 315 of 415 Operand types: markerName: String pos: Array Compatibility: Version 2. The format of pos is Position2D.html 7/11/2010 . "RECTANGLE" or "ELLIPSE". Type of returned value: Nothing Description: Selects the shape (type) of the marker. Example: "Marker1" setMarkerShape "RECTANGLE" Category: OFP name setMarkerShapeLocal shape Operand types: name: String shape: String Compatibility: Version 2.86 required. Example: "Marker1" setMarkerShapeLocal "RECTANGLE" Category: OFP http://www. The marker is only modified on the computer where the command is called.com/comref/full. "RECTANGLE" or "ELLIPSE". Shape can be "ICON". Example: "MarkerOne" setMarkerPosLocal getMarkerPos "MarkerTwo" Category: OFP name setMarkerShape shape Operand types: name: String shape: String Compatibility: Version 1. Shape can be "ICON". Type of returned value: Nothing Description: Selects the shape (type) of the marker.

Type of returned value: Nothing Description: Sets the marker size. Type of returned value: Nothing Description: Sets the text label of an existing marker. Size is in format [a-axis. 200] Category: OFP marker setMarkerSizeLocal size Operand types: marker: String size: Array Compatibility: Version 2. The marker is modified on all computers in a network session. b-axis].html 7/11/2010 . b-axis].21 required. The marker is only modified on the computer where the command is called.com/comref/full. The marker is modified on all computers in a network session. Size is in format [a-axis. Type of returned value: Nothing Description: Sets the marker size.86 required.arma2.92 required. http://www.BIS Game Engine Scripting Commands Page 316 of 415 marker setMarkerSize size Operand types: marker: String size: Array Compatibility: Version 1. Example: "MarkerOne" setMarkerSize [100. 200] Category: OFP name setMarkerText text Operand types: name: String text: String Compatibility: Version 1. Example: "MarkerOne" setMarkerSizeLocal [100.

"Flag1".com/comref/full. "Warning". "Marker". "Pickup". Type may be any of: "Flag". The marker is modified on all computers in a network session. Type of returned value: Nothing Description: Sets the text label of an existing marker. Type of returned value: http://www. "Start". Category: OFP markerName setMarkerType markerType Operand types: markerName: String markerType: String Type of returned value: Nothing Description: Sets the marker type. "End". "Join".html 7/11/2010 . "Destroy". Category: OFP name setMarkerTextLocal text Operand types: name: String text: String Compatibility: Version 2. "Dot". Example: "Marker1" setMarkerTextLocal You are here. "Unknown". The marker is only modified on the computer where the command is called.BIS Game Engine Scripting Commands Page 317 of 415 Example: "Marker1" setMarkerText You are here.92 required. Example: "MarkerOne" setMarkerType "Arrow" Category: OFP markerName setMarkerTypeLocal markerType Operand types: markerName: String markerType: String Compatibility: Version 2. "Arrow" or "Empty".92 required.arma2.

"Arrow" or "Empty".5.BIS Game Engine Scripting Commands Page 318 of 415 Nothing Description: Sets the marker type. "Normal". "Agresive" and "Angry". "Smile".91 required.html 7/11/2010 . The following values are recognized: "Default". "Sad". Type of returned value: Nothing Description: Move (UI) mouse pointer to specified position of the screen. "Destroy". Example: "MarkerOne" setMarkerTypeLocal "Arrow" Category: OFP person setMimic mimic Operand types: person: Object mimic: String Type of returned value: Nothing Description: Sets a unit's mimic. "Flag1". Example: setMimic "Angry" Category: OFP setMousePosition [x. "Hurt". "Warning".arma2. The marker is only modified on the computer where the command is called. "Unknown". "Marker". "Join". "End". "Ironic". "Dot". "Surprised".5] Category: OFP trigger or waypoint setMusicEffect track Operand types: trigger or waypoint: Object or Array track: String http://www.com/comref/full. Type may be any of: "Flag". y] Operand types: [x. "Pickup". "Cynic". y]: Array Compatibility: Version 2. 0. "Start". Example: setMousePosition [0.

90 required. Category: Location map setObjectArguments [object. Category: Editor map setObjectProxy [object.html 7/11/2010 . proxy object]: Array Compatibility: Version 2. [name1.. proxy object] Operand types: map: Control [object. "$NONE$" (no change) or "$STOP$" (stops the current music track). Type of returned value: Nothing Description: Set which global variable will contain given location.86 required. Track is a subclass name of CfgMusic. [name1.92 required. Type of returned value: Any Description: Set object arguments in mission editor.com/comref/full. Type of returned value: Nothing Description: Defines the music track played on activation.]]: Array Compatibility: Version 2.. value1.BIS Game Engine Scripting Commands Page 319 of 415 Compatibility: Version 1. .92 required.]] Operand types: map: Control [object. Example: trigger setMusicEffect "Track1" Category: OFP location setName name Operand types: location: Location name: String Compatibility: Version 2. http://www. .arma2. value1...

A time of zero means an immediate change. Velocity is transformed and http://www.75 required. Type of returned value: Nothing Description: Update particle source to create particles on circle with given radius. Type of returned value: Nothing Category: Resistance time setOvercast overcast Operand types: time: Number overcast: Number Type of returned value: Nothing Description: Changes the overcast level to the given value smoothly during the given time (in seconds).arma2.html 7/11/2010 . An overcast level of zero means clear (sunny) weather and with an overcast level of one. Category: Editor object setObjectTexture texture Operand types: object: Object texture: Array Compatibility: Version 1. velocity] Operand types: particleSource: Object [radius. Example: 1800 setOvercast 0.com/comref/full. velocity]: Array Compatibility: Version 2. storms and showers are very likely.BIS Game Engine Scripting Commands Page 320 of 415 Type of returned value: Any Description: Set the proxy object associated with the given editor object.56 required.5 Category: OFP particleSource setParticleCircle [radius.

arma2. Example: setPlayable aP http://www. Type of returned value: Nothing Description: Create MP role for the unit. randomDirectionIntensity.html 7/11/2010 .56 required.56 required. {angle}]: Array Compatibility: Version 2. Category: OFP particleSource setParticleParams array Operand types: particleSource: Object array: Array Compatibility: Version 2. Category: OFP particleSource setParticleRandom [lifeTime. rotationVelocity. position. randomDirectionPeriod. moveVelocity. Category: OFP setPlayable unit Operand types: unit: Object Compatibility: Version 2. randomDirectionPeriod. {angle}] Operand types: particleSource: Object [lifeTime. rotationVelocity.com/comref/full. size. position. color.92 required.BIS Game Engine Scripting Commands Page 321 of 415 added to total velocity. Array is in format ParticleArray. moveVelocity. color. size. Type of returned value: Nothing Description: Set randomization of particle source parameters. randomDirectionIntensity. Type of returned value: Nothing Description: Set parameters to particle source.

53 required. The pos array uses the Position format.53 required. Type of returned value: Nothing Description: Sets the object position. getposASL player select 1 + 10. getpos player select 1 + 10] Category: OFP obj setPosASL pos Operand types: obj: Object pos: Array Compatibility: Version 2. The pos array uses the PositionASL format.arma2. The pos array uses the PositionASL format. Example: player setPos [getpos player select 0. Type of returned value: Nothing Description: Sets the object position. Example: http://www. The version of the command does not offset based on object center.html 7/11/2010 .BIS Game Engine Scripting Commands Page 322 of 415 Category: OFP obj setPos pos Operand types: obj: Object pos: Array Type of returned value: Nothing Description: Sets the object position. getPosASL select 2] Category: OFP obj setPosASL2 pos Operand types: obj: Object pos: Array Compatibility: Version 2. Example: player setPosASL [getposASL player select 0.com/comref/full.

Type of returned value: Nothing Description: Changes the rain density smoothly during the given time (in seconds). Example: 0 setRadioMsg "Alpha Radio" Category: OFP time setRain rainDensity Operand types: time: Number rainDensity: Number Compatibility: Version 1.com/comref/full.75 required. getposASL player select 1 + 10. Use "NULL" to disable the radio slot.90 required.html 7/11/2010 . Example: http://www. Rain is not possible when overcast is smaller than 0. A rain level of zero is no rain and a rain level of one is maximum rain. getPosASL select 2] Category: OFP location setPosition position Operand types: location: Location position: Array Compatibility: Version 2. map radio) to the given text. 0.7. Category: Location index setRadioMsg text Operand types: index: Number text: String Type of returned value: Nothing Description: Sets the radio message (0.arma2. Type of returned value: Nothing Description: Set a new position of given location.BIS Game Engine Scripting Commands Page 323 of 415 player setPosASL [getposASL player select 0. A time of zero means an immediate change.

CORPORAL.92 required.html 7/11/2010 .com/comref/full. Example: http://www. An amount of one is a full cargo space. Type of returned value: Nothing Description: Set if given location has rectangular shape.90 required. MAJOR or COLONEL. LIEUTENANT. Category: Location vehicle setRepairCargo amount Operand types: vehicle: Object amount: Number Type of returned value: Nothing Description: Sets the amount or repair resources in the cargo space of a repair vehicle. Example: player setRank "COLONEL" Category: OFP location setRectangular rectangular Operand types: location: Location rectangular: Boolean Compatibility: Version 2.BIS Game Engine Scripting Commands Page 324 of 415 60 setRain 1 Category: OFP unit setRank rank Operand types: unit: Object rank: String Compatibility: Version 2. Type of returned value: Nothing Description: Sets rank of given unit. Possible values: PRIVATE. CAPTAIN. SERGEANT.arma2.

Category: Identity task setSimpleTaskDestination position Operand types: task: Task position: Array Compatibility: Version 5500 required. Type of returned value: Nothing Description: Set a new target side of given location. descriptionShort.com/comref/full.arma2. Type of returned value: Nothing Description: Attach a destination to the simple task. descriptionShort.html 7/11/2010 . descriptionHUD] Operand types: task: Task [description. descriptionHUD]: Array Compatibility: Version 5500 required.BIS Game Engine Scripting Commands Page 325 of 415 repairTruckOne setRepairCargo 0 Category: OFP location setSide side Operand types: location: Location side: Side Compatibility: Version 2. Category: Location task setSimpleTaskDescription [description.90 required. Type of returned value: Nothing Description: Attach descriptions to the simple task. Category: Identity http://www.

Example: hero setSkill 1 Category: Resistance vehicle setSkill [type. Type of returned value: Nothing Description: Sets skill of given type of person (commander unit).com/comref/full. Value of skill may vary from 0 to 1.75 required. Value of skill may vary from 0 to 1.65 required. Example: hero setSkill ["Endurance". Type of returned value: Nothing Description: Sets ability levell of person (commander unit). sizeZ] Operand types: location: Location [sizeX.html 7/11/2010 . skill]: Array Compatibility: Version 2.arma2.BIS Game Engine Scripting Commands Page 326 of 415 location setSize [sizeX. 1] Category: OFP PC http://www. Category: Location vehicle setSkill skill Operand types: vehicle: Object skill: Number Compatibility: Version 1. Type of returned value: Nothing Description: Set a new size (width. height) of given location. sizeZ]: Array Compatibility: Version 2.90 required. skill] Operand types: vehicle: Object [type.

Example: groupOne setSpeedMode "LIMITED" Category: OFP object setTargetAge age Operand types: object: Object age: String Compatibility: Version 2. Example: trigger setSoundEffect ["Alarm". "NORMAL" (full speed. "10 MIN". They behave like the target was seen age seconds ago. SoundEnv plays an enviromental sound from CfgEnvSounds. soundEnv. Mode may be one of: "LIMITED" (half speed). maintain formation) or "FULL" (do not wait for any other units in the formation). "". SoundDet (only for triggers) creates a dynamic sound object attached to a trigger defined in CfgSFX. ""] Category: OFP group setSpeedMode mode Operand types: group: Object or Group mode: String Type of returned value: Nothing Description: Sets the group speed mode. "60 MIN". soundDet] Operand types: trigger or waypoint: Object or Array [sound.86 required. soundDet]: Array Compatibility: Version 1. "".html 7/11/2010 .com/comref/full. "30 MIN". Type of returned value: Nothing Description: Defines the different sound effects. voice.arma2. soundEnv. Possible age values are: "ACTUAL". "15 MIN".BIS Game Engine Scripting Commands Page 327 of 415 trigger or waypoint setSoundEffect [sound. voice. "5 MIN".32 required. Example: player setTargetAge "10 MIN" http://www. "120 MIN" or "UNKNOWN". Type of returned value: Nothing Description: Sets how the target is known to the other centers. Sound / voice plays a 2D / 3D sound from CfgSounds.

25.89 required. 6.5 Category: OFP http://www.125. result]: Array Compatibility: Version 2.75 required.html 7/11/2010 .arma2. If you select an unsupported resolution. Type of returned value: Nothing Description: Sets the desired terrain resolution (in meters).25 and 3.92 required. For default landscapes the supported resolutions are: 50. the nearest supported resolution is used instead. Category: Identity setTerrainGrid grid Operand types: grid: Number Compatibility: Version 1. Category: Identity task setTaskState state Operand types: task: Task state: String Compatibility: Version 2.5.com/comref/full. Type of returned value: Nothing Description: Set a new state of the task. result] Operand types: task: Task [state. 12.BIS Game Engine Scripting Commands Page 328 of 415 Category: OFP task setTaskResult [state. Example: setTerrainGrid 12. Type of returned value: Nothing Description: Set a result of the task.

"LEADER" or "MEMBER". "GOLF".90 required. "HOTEL". The second argument - http://www.86 required. "PLAIN DOWN". repeating] Operand types: trigger: Object [by. "STATIC". Type can be "NONE". "BLACK".com/comref/full. text defines the shown object. Example: trigger setTitleEffect ["TEXT".BIS Game Engine Scripting Commands Page 329 of 415 location setText text Operand types: location: Location text: String Compatibility: Version 2. "INDIA". "ECHO". the effect defines a subtype: "PLAIN". effect. Type of returned value: Nothing Description: Defines the trigger activation type. "VEHICLE". For "TEXT". "Hello world.who activates trigger (side.arma2. Type of returned value: Nothing Description: Set a new text attached to given location. a subclass of CfgTitles. "LOGIC". vehicle or group member): "NONE". "DELTA". For "RES". "BLACK OUT". text] Operand types: trigger or waypoint: Object or Array [type. "BLACK IN". type. "BRAVO". "PLAIN DOWN". "GROUP". "JULIET". a subclass of RscTitles. text]: Array Compatibility: Version 1. "RES" or "TEXT". Type of returned value: Nothing Description: Defines the title effect. "ANY". "WHITE OUT" or "WHITE IN". "OBJECT". Category: Location trigger or waypoint setTitleEffect [type. "WEST". "CHARLIE". "BLACK FADED". text defines a resource class. radio. "FOXTROT". Text is shown as text itself. "EAST".86 required. effect. "CIV"."] Category: OFP trigger setTriggerActivation [by. "GUER". type. "ALPHA". The first argument . repeating]: Array Compatibility: Version 1. For "OBJECT".html 7/11/2010 .

The area is rectangular or elliptic. Type of returned value: Nothing Description: Defines the area controlled by the trigger. Variable thisList contains all vehicles which caused the activation. Example: trigger setTriggerArea [100. rectangle] Operand types: trigger: Object [a. "NOT PRESENT". the width is 2 * a. "EAST D". desactiv] Operand types: trigger: Object [cond.BIS Game Engine Scripting Commands Page 330 of 415 when is it activated (presention or detection by the specified side): "PRESENT".html 7/11/2010 . desactiv]: Array Compatibility: Version 1. activ.whether the activation is repeating.86 required. "ok = false"] Category: OFP trigger setTriggerText text http://www. Example: trigger setTriggerActivation ["WEST". It is rotated angle degrees. Activ and desactiv expressions are launched upon trigger activation / deactivation. The third argument . 50. Type of returned value: Nothing Description: The first argument can modify the condition of when the trigger is activated. b. rectangle]: Array Compatibility: Version 1. angle.com/comref/full.arma2. "ok = true". 45. "WEST D". angle. "GUER D" or "CIV D".86 required. "EAST D". activ. Example: trigger setTriggerStatements ["this". b. The result of the activation defined by trigger activation is in variable this. true] Category: OFP trigger setTriggerArea [a. the height is 2 * b. false] Category: OFP trigger setTriggerStatements [cond.

Type of returned value: Nothing Description: Sets the type of action processed by the trigger after activation (no action. "END4". Example: trigger setTriggerText "Call for support" Category: OFP trigger setTriggerTimeout [min. This is used for example as a radio slot label for radio activated triggers.86 required.com/comref/full. 7. Type of returned value: Nothing Description: Defines the time between condition satisfaction and trigger activation (randomly from min to max. max. "END5". "SWITCH". 10.86 required.BIS Game Engine Scripting Commands Page 331 of 415 Operand types: trigger: Object text: String Compatibility: Version 1. the condition must be fullfilled all the time. "LOOSE" or "WIN". "END1". "END3".html 7/11/2010 . with an average value mid).arma2.86 required. Type of returned value: Nothing Description: Sets the text label attached to the trigger object. Example: trigger setTriggerTimeout [5. If the last argument is true. Example: trigger setTriggerType "END1" http://www. a waypoints switch or an end of mission): "NONE". mid. false] Category: OFP trigger setTriggerType action Operand types: trigger: Object action: String Compatibility: Version 1. interruptable] Operand types: trigger: Object [min. mid. interruptable]: Array Compatibility: Version 1. max. "END6". "END2".

0 Category: OFP http://www. Category: OFP unit setUnitAbility skill Operand types: unit: Object skill: Number Compatibility: Version 2.com/comref/full. Type of returned value: Nothing Description: Sets skill of given unit.arma2.90 required.html 7/11/2010 . Category: Location unit setUnconscious set Operand types: unit: Object set: Boolean Compatibility: Version 5501 required.33 required. Example: player setUnitSkill 1.BIS Game Engine Scripting Commands Page 332 of 415 Category: OFP location setType type Operand types: location: Location type: String Compatibility: Version 2.0. Type of returned value: Nothing Description: Set / reset the unconscious life state of the given unit (in MP works only for a local unit). Skill may vary from 0.2 to 1. Type of returned value: Nothing Description: Set a new type of given location.

LIEUTENANT. CAPTAIN.33 required.arma2.BIS Game Engine Scripting Commands Page 333 of 415 unit setUnitPos mode Operand types: unit: Object mode: String Type of returned value: Nothing Description: Sets the unit position rules. Mode may be one of: "DOWN". SERGEANT. Possible values: PRIVATE. Example: soldierOne setUnitPos "Down" Category: OFP unit setUnitPosWeak mode Operand types: unit: Object mode: String Compatibility: Version 5117 required. "UP" or "AUTO".html 7/11/2010 . Type of returned value: Nothing Description: Sets rank of given unit. CORPORAL. for usage in formation FSM (to avoid collision with setUnitPos used by the mission). Example: soldierOne setUnitPosWeak "Down" Category: OFP unit setUnitRank rank Operand types: unit: Object rank: String Compatibility: Version 2. MAJOR or COLONEL. Type of returned value: Nothing Description: Equal to setUnitPos.com/comref/full. Example: player setUnitRank "COLONEL" Category: OFP http://www.

Type of returned value: Nothing Description: Set variable to given value in the variable space of given group. value. public]: Array Compatibility: Version 2. If public is true then the value is broadcast to all computers. value]: Array Compatibility: Version 5501 required. Type of returned value: Nothing Description: Set variable to given value in the given namespace.92 required. value. value]: Array Compatibility: Version 5501 required. Category: Default group setVariable [name.arma2. Type of returned value: Nothing Description: Set variable to given value in the variable space of given object. Category: OFP map setVariable [name.com/comref/full. value] Operand types: namespace: Namespace [name. Category: OFP object setVariable [name.html 7/11/2010 . public] Operand types: object: Object [name. If public is true then the value is broadcast to all computers.BIS Game Engine Scripting Commands Page 334 of 415 namespace setVariable [name. value] Operand types: group: Group [name. value] http://www.

Category: Editor task setVariable [name.arma2. value]: Array Compatibility: Version 2.92 required. Category: Location object setVectorDir [x.61 required. Type of returned value: Nothing Description: Set variable to given value in the variable space of given map. value]: Array Compatibility: Version 2.92 required. Type of returned value: http://www. Category: Identity location setVariable [name. y] Operand types: object: Object [x.92 required.BIS Game Engine Scripting Commands Page 335 of 415 Operand types: map: Control [name.com/comref/full.html 7/11/2010 . Type of returned value: Nothing Description: Set variable to given value in the variable space of given task. value]: Array Compatibility: Version 2. value] Operand types: location: Location [name. y]: Array Compatibility: Version 2. z. Type of returned value: Nothing Description: Set variable to given value in the variable space of given location. z. value] Operand types: task: Task [name.

Category: OFP object setVectorDirAndUp [[x. z. z.61 required. y.html 7/11/2010 . Category: OFP object setVehicleAmmo value Operand types: object: Object value: Number Compatibility: Version 2.BIS Game Engine Scripting Commands Page 336 of 415 Nothing Description: Set object's direction vector. Type of returned value: Nothing Description: Sets how much ammunition (compared to the current configuration of magazines. Type of returned value: Nothing Description: Set object's direction and up vector Category: OFP object setVectorUp [x. z]] Operand types: object: Object [[x. z]]: Array Compatibility: Version 5164 required. but fully loaded) the vehicle has.com/comref/full. Example: http://www. The value ranges from 0 to 1.[x.32 required. y]: Array Compatibility: Version 2. y] Operand types: object: Object [x. y. y].arma2. Direction vector will remain unchanged. y]. Type of returned value: Nothing Description: Set object's up vector. Up vector will remain unchanged.[x. z. z.

arma2. Example: player setVehicleArmor 0. By this id vehicle is referenced by triggers and waypoints.33 required. Example: player setVehicleId 1 Category: OFP vehicle setVehicleInit statement Operand types: vehicle: Object statement: String Compatibility: Version 2. Type of returned value: Nothing Description: Sets id (integer value) to vehicle. Type of returned value: Nothing Description: Sets the armor (or health for men) state of the vehicle (a value from 0 to 1).BIS Game Engine Scripting Commands Page 337 of 415 player setVehicleAmmo 0 Category: OFP object setVehicleArmor value Operand types: object: Object value: Number Compatibility: Version 2.com/comref/full.5 Category: OFP object setVehicleId id Operand types: object: Object id: Number Compatibility: Version 2. Type of returned value: Nothing Description: http://www.32 required.html 7/11/2010 .33 required.

BIS Game Engine Scripting Commands

Page 338 of 415

Execute statement attached to vehicle. This statement is also propagated over network in MP games. Example: soldier3 setVehicleInit "this allowfleeing 0" Category: OFP

vehicle setVehicleLock state
Operand types: vehicle: Object state: String Compatibility: Version 2.33 required. Type of returned value: Nothing Description: Set how vehicle is locked for player. Possible values: UNLOCKED, DEFAULT or LOCKED. Example: veh1 setVehicleLock "LOCKED" Category: OFP

object setVehiclePosition [position, markers, placement]
Operand types: object: Object [position, markers, placement]: Array Compatibility: Version 2.32 required. Type of returned value: Nothing Description: Changes the object position. If the markers array contains more than one marker names, the position of a random one is used. Otherwise, the given position is used. The object is placed inside a circle with this position as its center and placement as its radius. Example: player setVehiclePosition [[0, 0, 0], ["Marker1"], 0] Category: OFP

object setVehicleVarName name
Operand types: object: Object

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 339 of 415

name: String Compatibility: Version 2.32 required. Type of returned value: Nothing Description: Sets the name of the variable which contains a reference to this object. It is necessary in MP to change the variable content after a respawn. Example: player setVehicleVarName "aP" Category: OFP

vehicle setVelocity [x, z, y]
Operand types: vehicle: Object [x, z, y]: Array Compatibility: Version 1.80 required. Type of returned value: Nothing Description: Sets the velocity (speed vector) of a vehicle. Category: OFP

setViewDistance distance
Operand types: distance: Number Type of returned value: Nothing Description: Sets the rendering distance. Default is 900 meters. The accepted range is from 500 to 5000 meters. Example: setviewdistance 2000 Category: OFP

map setVisibleIfTreeCollapsed [object, visible if tree collapsed]
Operand types: map: Control [object, visible if tree collapsed]: Array Compatibility:

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 340 of 415

Version 2.92 required. Type of returned value: Nothing Description: Sets whether or not the object is visible even if the tree is collapsed. Category: Editor

waypoint setWaypointBehaviour mode
Operand types: waypoint: Array mode: String Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Switches the unit behaviour when the waypoint becomes active. Possible values are: "UNCHANGED", "CARELESS", "SAFE", "AWARE", "COMBAT" and "STEALTH". Example: [grp, 2] setWaypointBehaviour "AWARE" Category: OFP

waypoint setWaypointCombatMode mode
Operand types: waypoint: Array mode: String Compatibility: Version 1.86 required. Type of returned value: Nothing Description: The group combat mode is switched when the waypoint becomes active. Possible values are: "NO CHANGE", "BLUE", "GREEN", "WHITE", "YELLOW" and "RED". Example: [grp, 2] setWaypointCombatMode "RED" Category: OFP

waypoint setWaypointCompletionRadius radius
Operand types: waypoint: Array

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 341 of 415

radius: Number Compatibility: Version 5500 required. Type of returned value: Nothing Description: Set the radius around the waypoint where is the waypoint completed. Example: [grp, 2] setWaypointCompletionRadius 30 Category: OFP

waypoint setWaypointDescription text
Operand types: waypoint: Array text: String Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Sets the description shown in the HUD while the waypoint is active. Example: [grp, 2] setWaypointDescription "Move here." Category: OFP

waypoint setWaypointFormation formation
Operand types: waypoint: Array formation: String Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Switches the group formation when the waypoint becomes active. Possible values are: "NO CHANGE", "COLUMN", "STAG COLUMN", "WEDGE", "ECH LEFT", "ECH RIGHT", "VEE" and "LINE". Example: [grp, 2] setWaypointFormation "LINE" Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 342 of 415

waypoint setWaypointHousePosition pos
Operand types: waypoint: Array pos: Number Compatibility: Version 1.86 required. Type of returned value: Nothing Description: For waypoints attached to a house, this defines the target house position. Example: [grp, 2] setWaypointHousePosition 1 Category: OFP

waypoint setWaypointPosition [center, radius]
Operand types: waypoint: Array [center, radius]: Array Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Moves the waypoint to a random position in a circle with the given center and radius. Example: [grp, 2] setWaypointPosition [position player, 0] Category: OFP

waypoint setWaypointScript command
Operand types: waypoint: Array command: String Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Attaches a script to a scripted waypoint. Command consist of a script name and additional script arguments. Example: [grp, 2] setWaypointScript "find.sqs player" Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 343 of 415

waypoint setWaypointSpeed mode
Operand types: waypoint: Array mode: String Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Switches the group speed mode when the waypoint becomes active. Possible values are: "UNCHANGED", "LIMITED", "NORMAL" and "FULL". Example: [grp, 2] setWaypointSpeed "FULL" Category: OFP

waypoint setWaypointStatements [condition, statement]
Operand types: waypoint: Array [condition, statement]: Array Compatibility: Version 1.86 required. Type of returned value: Nothing Description: The waypoint is done only when the condition is fulfilled. When the waypoint is done, the statement expression is executed. Example: [grp, 2] setWaypointStatements ["true", ""] Category: OFP

waypoint setWaypointTimeout [min, mid, max]
Operand types: waypoint: Array [min, mid, max]: Array Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Defines the time between condition satisfaction and waypoint finish (randomly from min to max, with an average value mid).

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 344 of 415

Example: [grp, 2] setWaypointTimeout [5, 10, 6] Category: OFP

waypoint setWaypointType type
Operand types: waypoint: Array type: String Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Changes the waypoint type. Type can be: "MOVE", "DESTROY", "GETIN", "SAD", "JOIN", "LEADER", "GETOUT", "CYCLE", "LOAD", "UNLOAD", "TR UNLOAD", "HOLD", "SENTRY", "GUARD", "TALK", "SCRIPTED", "SUPPORT", "GETIN NEAREST", "AND" or "OR". Example: [grp, 2] setWaypointType "HOLD" Category: OFP

setWind [x, z, forced]
Operand types: [x, z, forced]: Array Compatibility: Version 5501 required. Type of returned value: Nothing Description: Set current (forced == false) or permanent (forced == true) wind direction and force. Category: OFP

wapoint setWPPos position
Operand types: wapoint: Array position: Array Compatibility: Version 1.21 required. Type of returned value: Nothing Description: Sets the waypoint position. Waypoint uses format Waypoint. Position uses format Position2D.

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 345 of 415

Example: [groupOne, 1] setWPPos getMarkerPos "MarkerOne" Category: OFP

map show3DIcons bool
Operand types: map: Control bool: Boolean Compatibility: Version 2.92 required. Type of returned value: Nothing Description: Toggle the drawing of 3D icons. Category: Editor

showCinemaBorder show
Operand types: show: Boolean Type of returned value: Nothing Description: Forces drawing of the cinema borders. This is normally used in cutscenes to indicate the player has no control. Category: OFP

showCommandingMenu class name
Operand types: class name: String Compatibility: Version 5500 required. Type of returned value: Nothing Description: Create the commanding menu described by the given config class. When class name is empty, current commanding menu is hidden. Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

92 required. Category: OFP showHUD enable Operand types: enable: Boolean Compatibility: Version 5501 required. Type of returned value: Nothing Description: Show/hide map legend. Category: OFP map showLegend bool Operand types: map: Control bool: Boolean Compatibility: Version 2. Type of returned value: Nothing Description: Enable / disable showing of HUD.BIS Game Engine Scripting Commands Page 346 of 415 showCompass show Operand types: show: Boolean Type of returned value: Nothing Description: Enables the compass (the default is true).html 7/11/2010 . Category: OFP showGps show Operand types: show: Boolean Type of returned value: Nothing Description: Enables the GPS receiver (the default is false).com/comref/full. Category: Editor http://www.arma2.

BIS Game Engine Scripting Commands

Page 347 of 415

showMap show
Operand types: show: Boolean Type of returned value: Nothing Description: Enables the map (the default is true). Example: showMap true Category: OFP

shownCompass
Type of returned value: Boolean Description: Checks whether the player has the compass enabled. Category: OFP

map showNewEditorObject [type, class, side, position]
Operand types: map: Control [type, class, side, position]: Array Compatibility: Version 2.92 required. Type of returned value: Any Description: Show the add editor object dialog, type is editor object type, class is class definition to automatically select, side filters by a certain side, pos is position to create the object. Category: Editor

shownGps
Type of returned value: Boolean Description: Checks whether the player has the GPS receiver enabled. Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 348 of 415

shownMap
Type of returned value: Boolean Description: Checks whether the player has the map enabled. Category: OFP

shownPad
Type of returned value: Boolean Description: Checks whether the player has the notebook enabled. Category: OFP

shownRadio
Type of returned value: Boolean Description: Checks whether the player has the radio transmitter enabled. Category: OFP

shownWarrant
Type of returned value: Boolean Description: Checks whether the player has the ID card enabled. (Obsolete). Category: OFP

shownWatch
Type of returned value: Boolean Description: Checks whether the player has the watch enabled. Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 349 of 415

showPad show
Operand types: show: Boolean Type of returned value: Nothing Description: Enables the notepad (the default is true). Category: OFP

showRadio show
Operand types: show: Boolean Type of returned value: Nothing Description: Enables the radio (the default is false). Category: OFP

showSubtitles enable
Operand types: enable: Boolean Compatibility: Version 5501 required. Type of returned value: Boolean Description: Enable / disable showing of subtitles. Return the previous state. Category: OFP

showWarrant show
Operand types: show: Boolean Type of returned value: Nothing Description: Obsolete. Enables the ID card (the default is false). Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 350 of 415

showWatch show
Operand types: show: Boolean Type of returned value: Nothing Description: Enables the watch (the default is true). Category: OFP

waypoint showWaypoint show
Operand types: waypoint: Array show: String Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Sets the condition determining when the waypoint is shown. Possible values are: "NEVER", "EASY" and "ALWAYS". Example: [grp, 2] showWaypoint "ALWAYS" Category: OFP

side location
Operand types: location: Location Compatibility: Version 2.90 required. Type of returned value: Side Description: Return target side of given location. Category: Location

side unit
Operand types: unit: Object

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 351 of 415

Type of returned value: Side Description: Returns the side of the unit. Example: side player == west Category: OFP

side group
Operand types: group: Group Compatibility: Version 5501 required. Type of returned value: Side Description: Returns the side of the group. Example: side group player == west Category: OFP

unit sideChat chatText
Operand types: unit: Object or Array chatText: String Type of returned value: Nothing Description: Types text to the side radio channel. Note: this function only types text to the list, it does not broadcast the message. If you want the message to show on all computers, you have to execute it on all of them. Example: soldierOne sideChat "Show this text" Category: OFP

sideEnemy
Compatibility: Version 1.78 required. Type of returned value:

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 352 of 415

Side Description: The Enemy side (used for renegades). Category: OFP

sideFriendly
Compatibility: Version 1.78 required. Type of returned value: Side Description: The Friendly side (used for captives). Category: OFP

sideLogic
Compatibility: Version 1.86 required. Type of returned value: Side Description: The Logic side. Category: OFP

unit sideRadio radioName
Operand types: unit: Object or Array radioName: String Type of returned value: Nothing Description: Sends the message to the side radio channel. The message is defined in the description.ext file or radio protocol. Example: soldierOne sideRadio "messageOne" Category: OFP

sideUnknown

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 353 of 415

Compatibility: Version 5501 required. Type of returned value: Side Description: The unknown side. Category: OFP

simpleTasks person
Operand types: person: Object Compatibility: Version 5501 required. Type of returned value: Array Description: Return all simple tasks assigned to given person. Category: Identity

simulationEnabled entity
Operand types: entity: Object Compatibility: Version 5500 required. Type of returned value: Boolean Description: Check if the entity has enabled simulation. Category: OFP

sin x
Operand types: x: Number Type of returned value: Number Description: The sine of x, the argument is in degrees. Example: sin 30 , result is 0.5 Category: Default

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 354 of 415

size location
Operand types: location: Location Compatibility: Version 2.90 required. Type of returned value: Array Description: Return size of given location (width, height). Category: Location

sizeOf typeName
Operand types: typeName: String Compatibility: Version 5160 required. Type of returned value: Number Description: Return the size of the entity of given type. Category: OFP

skill person
Operand types: person: Object Compatibility: Version 1.75 required. Type of returned value: Number Description: Returns the current level of ability of the person. Example: skill player Category: Resistance

vehicle skill type
Operand types: vehicle: Object

http://www.arma2.com/comref/full.html

7/11/2010

a weather change is estimated and no changes to any units are done.html 7/11/2010 . Example: skipTime 2.com/comref/full. Type of returned value: Number Description: Returns skill of given type of person (commander unit).65 required. Example: sleep 0.5 Category: OFP sliderPosition idc Operand types: idc: Number http://www.arma2.60 required. Duration is in hours.5 Category: OFP sleep delay Operand types: delay: Number Compatibility: Version 2.BIS Game Engine Scripting Commands Page 355 of 415 type: String Compatibility: Version 2. Type of returned value: Nothing Description: Suspend execution of script for given time. Value of skill may vary from 0 to 1. Example: hero skill "Endurance" Category: OFP PC skipTime duration Operand types: duration: Number Type of returned value: Nothing Description: Skips the specified time. Daytime is adjusted.

BIS Game Engine Scripting Commands Page 356 of 415 Compatibility: Version 1. Example: _limits = sliderRange 100 Category: Resistance sliderRange control Operand types: control: Control http://www. Type of returned value: Number Description: Returns the current thumb position of the slider with id idc of the topmost user dialog.com/comref/full.arma2.79 required.92 required. Type of returned value: Array Description: Returns the limits (as an array [min. Example: _pos = sliderPosition 101 Category: Resistance sliderPosition control Operand types: control: Control Compatibility: Version 2.html 7/11/2010 . max]) of the slider with id idc of the topmost user dialog.79 required. Example: _pos = sliderPosition _control Category: OFP PC sliderRange idc Operand types: idc: Number Compatibility: Version 1. Type of returned value: Number Description: Returns the current thumb position of the given slider.

pos] Operand types: [idc. min. Type of returned value: Array Description: Returns the limits (as an array [min. Example: _limits = sliderRange _control Category: OFP PC sliderSetPosition [idc.html 7/11/2010 . Type of returned value: Nothing Description: Sets the current thumb position of the slider with id idc of the topmost user dialog. 0] Category: Resistance control sliderSetPosition pos Operand types: control: Control pos: Number Compatibility: Version 2. max]) of the given slider.79 required.arma2.92 required.com/comref/full.BIS Game Engine Scripting Commands Page 357 of 415 Compatibility: Version 2. Type of returned value: Nothing Description: Sets the current thumb position of the given slider.92 required. pos]: Array Compatibility: Version 1. Example: _control sliderSetPosition 0 Category: OFP PC sliderSetRange [idc. Example: sliderSetPosition [100. max] Operand types: http://www.

10] Category: OFP PC sliderSetSpeed [idc.BIS Game Engine Scripting Commands Page 358 of 415 [idc. A click on the scale outside the thumb results in a move per page) of the slider with id idc of the topmost user dialog.html 7/11/2010 . max]: Array Compatibility: Version 1. Type of returned value: Nothing Description: Sets the limits of the slider with id idc of the topmost user dialog. 0. 0.79 required. min. line. 10] Category: Resistance control sliderSetRange [min. max] Operand types: control: Control [min.com/comref/full.5. Example: _control sliderSetRange [0. Example: sliderSetRange [100. page] Operand types: [idc.79 required. max]: Array Compatibility: Version 2.arma2. Type of returned value: Nothing Description: Sets the limits of the slider with id idc of the given slider.92 required. page] http://www. line. Example: sliderSetSpeed [100. 2. page]: Array Compatibility: Version 1. Type of returned value: Nothing Description: Sets the speed (a click on the arrow results in a move per line.0] Category: Resistance control sliderSetSpeed [line.

page]) of the given slider.arma2. Type of returned value: Array Description: Returns the speed (as an array [line.com/comref/full. Type of returned value: Nothing Description: Sets the speed (a click on the arrow results in a move per line.92 required.0] Category: OFP PC sliderSpeed idc Operand types: idc: Number Compatibility: Version 1. Example: _control sliderSetSpeed [0.79 required. A click on the scale outside the thumb results in a move per page) of the given slider. page]: Array Compatibility: Version 2.92 required.5.html 7/11/2010 . Example: _speed = sliderSpeed Category: Resistance sliderSpeed control Operand types: control: Control Compatibility: Version 2. page]) of the slider with id idc of the topmost user dialog. Example: _speed = sliderSpeed _control Category: OFP PC someAmmo unit http://www. 2.BIS Game Engine Scripting Commands Page 359 of 415 Operand types: control: Control [line. Type of returned value: Array Description: Returns the speed (as an array [line.

Example: someAmmo vehicle player Category: OFP soundVolume Type of returned value: Number Description: Checks the current sound volume (set by setSoundVolume). Category: OFP speed obj Operand types: obj: Object Type of returned value: Number Description: Returns the object speed (in km/h).html 7/11/2010 . Argument is passed to the script as local variable _this. Category: OFP arguments spawn script Operand types: arguments: Any script: Code Compatibility: Version 2.arma2.50 required. Example: speed player Category: OFP http://www.BIS Game Engine Scripting Commands Page 360 of 415 Operand types: unit: Object Type of returned value: Boolean Description: Checks whether the unit has some ammo remaining. Type of returned value: Script Description: Executes a script.com/comref/full.

Example: speedMode group player Category: OFP sqrt x Operand types: x: Number Type of returned value: Number Description: The square root of x.arma2. scripts run at full speed.com/comref/full. "NORMAL" or "FULL"). Category: OFP for /. using the given resource. resource]: Array Compatibility: Version 5501 required..BIS Game Engine Scripting Commands Page 361 of 415 speedMode grp Operand types: grp: Object or Group Type of returned value: String Description: Returns the speed mode of the group ("LIMITED". When loading screen is shown./ step step Operand types: for /./: for type http://www.. result is 3 Category: Default startLoadingScreen [text] or [text.html 7/11/2010 . Example: sqrt 9 . Type of returned value: Nothing Description: Shows loading screen with the given text.. simulation and scene drawing is disabled.. resource] Operand types: [text] or [text.

Default value is 1. and set negative. This function is obsolete.html 7/11/2010 . step must be specified.. Type of returned value: http://www.arma2. Example: stopped jeepOne Category: OFP str any value Operand types: any value: Any Compatibility: Version 2.com/comref/full. If you want to count down.. Example: for "_x" from 20 to 10 step -2 do {.00 required.} Category: Default unit stop stop Operand types: unit: Object stop: Boolean Type of returned value: Nothing Description: Stops an AI unit.code. Use disableAI to get better control over stopping a unit.BIS Game Engine Scripting Commands Page 362 of 415 step: Number Type of returned value: for type Description: Optionaly can set step. Example: soldierOne stop true Category: OFP stopped unit Operand types: unit: Object Type of returned value: Boolean Description: Checks whether the unit is stopped using the "stop" command.

result is ["b:ARRAY select SCALAR". 'name' is operator's/type's name (in case operator. if operator is not included in list. Type of returned value: Array Description: Creates list of supported operators and type. or one of field. Example: str(2+3) .58 required. function returns empty array. `mask` can contain wildcards. for example: *:name. 'b' . result is "5" Category: Default supportInfo mask Operand types: mask: String Compatibility: Version 2. 'u' . In this case. 'n' . type of input operands is included).arma2. y] Operand types: [x. Type of returned value: Boolean Description: Returns whether water is on given position.00 required.BIS Game Engine Scripting Commands Page 363 of 415 String Description: Converts any variable to a string.html 7/11/2010 . t:name* or *:*. y]: Array Compatibility: Version 2.com/comref/full. http://www. Each field of array has format: "x:name" where x is 't' . y] Operand types: [x.binary operator.nullary operator."b:ARRAY select BOOL"] Category: Default surfaceIsWater [x.unary operator. Example: supportInfo "b:select*" . `mask` parameter can be empty string. t:*. Category: OFP surfaceType [x.58 required.type. y]: Array Compatibility: Version 2.

BIS Game Engine Scripting Commands

Page 364 of 415

Type of returned value: String Description: Returns what surface is on given position. Category: OFP

switch exp
Operand types: exp: Any Type of returned value: Switch Type Description: Begins switch form Example: switch (_a) do { case 1: {block}; case 2 : {block}; default {block};} Category: Default

switchableUnits
Compatibility: Version 2.92 required. Type of returned value: Array Description: Return a list of units accessible through team switch. Category: OFP

soldier switchAction action
Operand types: soldier: Object action: String Compatibility: Version 5500 required. Type of returned value: Nothing Description: When used on a person, the given action is started immediately (there is no transition). Use switchmove "" to switch back to the default movement if there is no transition back, otherwise the person may be stuck. Example: soldierOne switchAction "SitDown"

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 365 of 415

Category: OFP

unit switchCamera mode
Operand types: unit: Object mode: String Type of returned value: Nothing Description: Switches the camera to the given vehicle / camera. Mode is one of: "INTERNAL" (1st person), "GUNNER" (optics / sights), "EXTERNAL" (3rd person) or "GROUP" (group). Example: sniperOne switchCamera "gunner" Category: OFP

soldier switchGesture moveName
Operand types: soldier: Object moveName: String Compatibility: Version 5500 required. Type of returned value: Nothing Description: When used on a person, the given move is started immediately (there is no transition). Example: soldierOne switchGesture "Wave" Category: OFP

lamppost switchLight mode
Operand types: lamppost: Object mode: String Type of returned value: Nothing Description: Controls the lamppost mode. Mode may be "ON", "OFF" and "AUTO". "AUTO" is default and means the lampost is only on during nighttime. Example:

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 366 of 415

nearestObject [player, "StreetLamp"] switchLight "Off" Category: OFP

soldier switchMove moveName
Operand types: soldier: Object moveName: String Type of returned value: Nothing Description: When used on a person, the given move is started immediately (there is no transition). Use switchmove "" to switch back to the default movement if there is no transition back, otherwise the person may be stuck. Example: soldierOne switchMove "FXStandDip" Category: OFP

synchronizedObjects unit
Operand types: unit: Object Compatibility: Version 5501 required. Type of returned value: Array Description: Return the list of objects synchronized with the given unit. Category: OFP

unit synchronizeObjectsAdd [objects]
Operand types: unit: Object [objects]: Array Compatibility: Version 5501 required. Type of returned value: Nothing Description: Add given objects to the unit's list of synchronized objects. Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 367 of 415

unit synchronizeObjectsRemove [objects]
Operand types: unit: Object [objects]: Array Compatibility: Version 5501 required. Type of returned value: Nothing Description: Remove given objects from the unit's list of synchronized objects. Category: OFP

trigger synchronizeTrigger [waypoint1, waypoint2, ...]
Operand types: trigger: Object [waypoint1, waypoint2, ...]: Array Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Synchronizes the trigger with waypoints. Each waypoint is given as an array [group, index]. Example: trigger synchronizeWaypoint [] Category: OFP

waypoint synchronizeWaypoint [waypoint1, waypoint2, ...]
Operand types: waypoint: Array [waypoint1, waypoint2, ...]: Array Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Synchronizes the waypoint with other waypoints. Each waypoint is given as an array [group, index]. Example: [group1, 2] synchronizeWaypoint [[group2, 3]] Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 368 of 415

trigger synchronizeWaypoint [waypoint1, waypoint2, ...]
Operand types: trigger: Object [waypoint1, waypoint2, ...]: Array Compatibility: Version 1.86 required. Type of returned value: Nothing Description: Synchronizes the trigger with waypoints. Each waypoint is given as an array [group, index]. Example: trigger synchronizeWaypoint [] Category: OFP

tan x
Operand types: x: Number Type of returned value: Number Description: The tangens of x, the argument is in degrees. Example: tan 45 , result is 1 Category: Default

[speaker, side, unit, place, time] targetsAggregate candidates
Operand types: [speaker, side, unit, place, time]: Array candidates: Array Compatibility: Version 2.92 required. Type of returned value: Array Description: Aggregate candidates. Category: Conversations

speaker targetsQuery [receiver, side, unit, place, time]
Operand types:

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 369 of 415

speaker: Object [receiver, side, unit, place, time]: Array Compatibility: Version 2.92 required. Type of returned value: Array Description: Find all targets known to sender matching given query. Category: Conversations

taskChildren task
Operand types: task: Task Compatibility: Version 2.92 required. Type of returned value: Array Description: Return the child tasks of the specified task. Category: Identity

taskCompleted task
Operand types: task: Task Compatibility: Version 2.89 required. Type of returned value: Boolean Description: Return if task is completed. (state Succeeded, Failed or Canceled) Category: Identity

taskDescription task
Operand types: task: Task Compatibility: Version 5501 required. Type of returned value: Array Description: Returns the descripction of the task.

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 370 of 415

Category: Identity

taskDestination task
Operand types: task: Task Compatibility: Version 2.92 required. Type of returned value: Array Description: Returns the position of the task (as specified by destination parameter in config). Category: Identity

taskHint text
Operand types: text: Array Type of returned value: Nothing Description: Shows info about new,changed or failed task. The text can contain several lines. \n is used to indicate the end of a line. Example: taskHint "Capture town." Category: OFP

taskNull
Compatibility: Version 5153 required. Type of returned value: Task Description: A non-existing task. This value is not equal to anything, including itself. Example: taskNull == taskNull , result is false Category: Identity

taskParent task

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands

Page 371 of 415

Operand types: task: Task Compatibility: Version 2.92 required. Type of returned value: Task Description: Return the parent task of the specified task. Category: Identity

taskResult task
Operand types: task: Task Compatibility: Version 2.92 required. Type of returned value: Array Description: Return the result of the given task. Category: Identity

taskState task
Operand types: task: Task Compatibility: Version 2.89 required. Type of returned value: String Description: Return the state of the given task. Category: Identity

teamSwitch
Compatibility: Version 2.92 required. Type of returned value: Nothing Description: Invoke the team switch dialog (force it even when conditions are noy met). Category: OFP

http://www.arma2.com/comref/full.html

7/11/2010

BIS Game Engine Scripting Commands Page 372 of 415 teamSwitchEnabled Compatibility: Version 2. Type of returned value: Structured text Description: Creates a structured text containing the given plain text. http://www. Type of returned value: Nothing Description: Terminate (abort) the script Category: OFP text location Operand types: location: Location Compatibility: Version 2. Type of returned value: Boolean Description: Check if tam switch is currently enabled.50 required.com/comref/full.90 required.html 7/11/2010 .92 required.arma2.01 required. Category: Location text text Operand types: text: String Compatibility: Version 2. Category: OFP terminate script Operand types: script: Script Compatibility: Version 2. Type of returned value: String Description: Return text attached to given location.

arma2.com/comref/full.if (a>b) then [{c=1}.BIS Game Engine Scripting Commands Page 373 of 415 Example: txt2 = text "Hello world. result is 1 Category: Default if then else Operand types: if: If Type else: Array Compatibility: Version 1. The result of the executed expression is returned as a result (the result may be nothing).85 required. Example: textLog player Category: OFP tg x Operand types: x: Number Type of returned value: Number Description: The tangens of x.{c=2}] http://www." Category: OFP textLog anything Operand types: anything: Any Type of returned value: Nothing Description: Dumps the argument value into the debugging output. Example: if (a>b) then {c=1} else {c=2}. the argument is in degrees. Type of returned value: Any Description: The first or second element of the array is executed depending on the result of the if condition.html 7/11/2010 . Example: tg 45 .

the last value calculated in the code is returned. See try.BIS Game Engine Scripting Commands Page 374 of 415 Category: Default if then codeToExecute Operand types: if: If Type codeToExecute: Code Compatibility: Version 1. nothing is returned. Example: if (a>b) then {c=1} Category: Default throw expression Operand types: expression: Any Type of returned value: Nothing Description: Throws an exception.com/comref/full. The exception is processed by first catch block.html 7/11/2010 .arma2. Type of returned value: Any Description: The code is executed when the if condition is met.85 required. Category: OFP titleCut effect http://www. If the code is executed. If the code is not executed. Example: throw "invalid argument" Category: Default time Type of returned value: Number Description: Returns the time that elapsed since the mission started (in seconds).

0 Category: OFP titleObj effect Operand types: effect: Array Type of returned value: Nothing Description: Object title ."type"]. it's assumed to be one.the argument uses format ["text"."type". Example: titleFadeIn 1. The object can be defined in the description. Category: OFP titleFadeOut duration Operand types: duration: Number Compatibility: Version 5126 required.arma2. Type of returned value: Nothing Description: Terminate the title effect and set duration of the fade out phase to the given time.com/comref/full.ext file.BIS Game Engine Scripting Commands Page 375 of 415 Operand types: effect: Array Type of returned value: Nothing Description: Obsolete."type"]."type".speed] or ["name"."plain"] Category: OFP titleRsc effect Operand types: effect: Array Type of returned value: Nothing Description: Resource title .speed] or ["name". Example: titleObj ["BISLogo". If speed is not http://www. If speed is not given.the argument uses format ["name".html 7/11/2010 .

.html 7/11/2010 .arma2. it's assumed to be one.the argument uses format ["text".} Category: Default toArray string Operand types: string: String Compatibility: Version 5195 required.com/comref/full."type"]. Example: titleText ["Show this text".. Example: titleRsc ["BIS".BIS Game Engine Scripting Commands Page 376 of 415 given. "PLAIN"] Category: OFP titleText effect Operand types: effect: Array Type of returned value: Nothing Description: Text title . Example: for "_x" from 10 to 20 do {."type". Resource can be defined in the description.ext file. it's assumed to be one. Type of returned value: Array Description: Convert the string to the array of characters. "PLAIN"] Category: OFP for "_var" from a to b Operand types: for "_var" from a: for type b: Number Type of returned value: for type Description: Continue sequence of 'for' command.speed] or ["text".code. If speed is not given. http://www.

109.html 7/11/2010 . Example: toLower "ArmA" . http://www. Type of returned value: String Description: Convert the string to upper case. 65] . 109. 114.BIS Game Engine Scripting Commands Page 377 of 415 Example: toArray "ArmA" .com/comref/full. 65] Category: Default toLower string Operand types: string: String Compatibility: Version 5195 required. result is "arma" Category: Default toString characters Operand types: characters: Array Compatibility: Version 5195 required.arma2. 114. result is "ArmA" Category: Default toUpper string Operand types: string: String Compatibility: Version 5195 required. Type of returned value: String Description: Convert the string to lower case. Type of returned value: String Description: Convert the array of characters to the string. Example: toString [65. result is [65.

angle. b.arma2. type.html 7/11/2010 . rectangle] Category: OFP triggerAttachedVehicle trigger http://www. Type of returned value: Array Description: Returns trigger activation in the form [by. Type of returned value: Boolean Description: Returns true if the trigger has been activated.BIS Game Engine Scripting Commands Page 378 of 415 Example: toUpper "ArmA" . repeating] Category: OFP triggerArea trigger Operand types: trigger: Object Compatibility: Version 5501 required.com/comref/full. Type of returned value: Array Description: Returns trigger area in the form [a. result is "ARMA" Category: Default triggerActivated trigger Operand types: trigger: Object Compatibility: Version 5501 required. Category: OFP triggerActivation trigger Operand types: trigger: Object Compatibility: Version 5501 required.

"LEADER" or "MEMBER". the trigger is attached to the vehicle or its group. Type of returned value: Object Description: Returns vehicle attached to the trigger (for example using triggerAttachVehicle) Category: OFP trigger triggerAttachObject objectId Operand types: trigger: Object objectId: Number Compatibility: Version 1. When the source is "GROUP". it's changed to "NONE". Example: trigger triggerAttachObject 1234 Category: OFP trigger triggerAttachVehicle [] or [vehicle] Operand types: trigger: Object [] or [vehicle]: Array Compatibility: Version 1.86 required. The activation source is changed to "STATIC". If the activation source is "VEHICLE". "GROUP".html 7/11/2010 . Example: trigger triggerAttachVehicle [player] Category: OFP http://www. otherwise it's attached to the vehicle and the source is changed to "VEHICLE".BIS Game Engine Scripting Commands Page 379 of 415 Operand types: trigger: Object Compatibility: Version 5101 required. Type of returned value: Nothing Description: If [] is given.arma2. "LEADER" or "MEMBER". the trigger is detached from the assigned vehicle.com/comref/full. If [vehicle] is given.86 required. it's attached to the group. Type of returned value: Nothing Description: Assigns a static object to the trigger.

Category: OFP triggerTimeout trigger Operand types: trigger: Object Compatibility: Version 5501 required. activ. Type of returned value: String Description: http://www. max. interruptable] Category: OFP triggerType trigger Operand types: trigger: Object Compatibility: Version 5501 required. desactiv] Category: OFP triggerText trigger Operand types: trigger: Object Compatibility: Version 5501 required. Type of returned value: Array Description: Returns trigger statements in the form [cond.com/comref/full. mid.arma2.html 7/11/2010 .BIS Game Engine Scripting Commands Page 380 of 415 triggerStatements trigger Operand types: trigger: Object Compatibility: Version 5501 required. Type of returned value: Array Description: Returns trigger timeout in the form [min. Type of returned value: String Description: Returns trigger text.

Category: OFP type task Operand types: task: Task Compatibility: http://www.html 7/11/2010 . Category: Default try code Operand types: code: Code Type of returned value: Exception Type Description: Defines try-catch structure.BIS Game Engine Scripting Commands Page 381 of 415 Returns trigger type. Category: Default vehicle turretUnit turret path Operand types: vehicle: Object turret path: Array Compatibility: Version 5501 required. Any thrown exception in try block is caught in catch block.arma2. Type of returned value: Object Description: Returns the unit in the vehicle turret. Category: OFP true Type of returned value: Boolean Description: Always true. The structured exception block has following formtry //begin of try-catch block { //block. that can throw exception } catch{ //block. that process an exception.com/comref/full. This is structured exception block. Exception is described in _exception variable }.

Type of returned value: String Description: Returns type-name of expression.html 7/11/2010 .91 required.00 required. Type of returned value: String Description: Return the type of the task.BIS Game Engine Scripting Commands Page 382 of 415 Version 2. Type of returned value: String Description: Return type of given location. Category: Location typeName any Operand types: any: Any Compatibility: Version 2.90 required.91 required.com/comref/full. result is "string" Category: Default typeOf object Operand types: object: Object Compatibility: Version 1. Type is returned as string Example: typeName "hello" . Type of returned value: String Description: Returns the name of the type of the given object.arma2. Category: Identity type location Operand types: location: Location Compatibility: Version 2. http://www.

Example: unassignTeam soldier2 Category: OFP unassignVehicle unit Operand types: unit: Object Type of returned value: Nothing Description: The person is unassigned from the vehicle.html 7/11/2010 . the group leader will issue an order to disembark. If he is currently inside. Example: unassignVehicle player Category: OFP http://www.BIS Game Engine Scripting Commands Page 383 of 415 Example: typeOf player .com/comref/full.arma2. Type of returned value: Nothing Description: Unassigns the vehicle (its commander unit) from his team.05 required. This is equal to vehicle assignTeam "MAIN". Type of returned value: Namespace Description: Return the global namespace attached to user interface. Category: OFP unassignTeam vehicle Operand types: vehicle: Object Compatibility: Version 2. result is "SoldierWB" Category: OFP uiNamespace Compatibility: Version 5501 required.

html 7/11/2010 .92 required. Type of returned value: String Description: Return the unit position rules. Example: player in units player Category: OFP units grp Operand types: grp: Group Type of returned value: http://www.arma2. Example: unitReady player Category: OFP units unit Operand types: unit: Object Type of returned value: Array Description: Returns an array with all the units in the group of the given object. until the command is finished. Category: OFP unitReady unit Operand types: unit: Object or Array Type of returned value: Boolean Description: Checks whether the unit is ready. A unit is busy when it's given an order like "move".com/comref/full.BIS Game Engine Scripting Commands Page 384 of 415 unitPos person Operand types: person: Object Compatibility: Version 2. For a destroyed object an empty array is returned.

shadow] Operand types: map: Control [object. angle.92 required. offset. Type of returned value: Boolean Description: Unlock the given achievement. color. If maintain size is false. maintain size?. width.90 required. height. Category: OFP teamMember unregisterTask name Operand types: teamMember: name: String Compatibility: Version 2. string identifier. Example: player in units group player Category: OFP unlockAchievement name Operand types: name: String Compatibility: Version 5501 required. offset.com/comref/full. maintain size?. color.html 7/11/2010 .arma2. http://www. angle. height. Type of returned value: Nothing Description: Updates the icon to be shown in 2D editor for the specified editor object. string identifier. Category: Identity map updateDrawIcon [object. shadow]: Array Compatibility: Version 2. Type of returned value: Boolean Description: Unregister a task type. width.BIS Game Engine Scripting Commands Page 385 of 415 Array Description: Returns an array with all the units in the group.

command] Operand types: map: Control [menu item index. Category: Editor updateObjectTree map Operand types: map: Control Compatibility: Version 2.command]: Array Compatibility: Version 2. Category: Editor soldier useAudioTimeForMoves toggle Operand types: soldier: Object toggle: Boolean Type of returned value: Nothing Description: Switch between elapsed gamet time and audio time being used as animation timer.com/comref/full. index is index as returned from addMenuItem command. command is optional. If maintain size is a number.html 7/11/2010 .text. Type of returned value: Nothing Description: Sets the text and command for the menu item. Example: player useAudioTimeForMoves true Category: OFP http://www. Category: Editor map updateMenuItem [menu item index.BIS Game Engine Scripting Commands Page 386 of 415 icon will not scale depending on the scale of the map.text. Type of returned value: Nothing Description: Update the editor object tree.arma2.92 required. Used for audio/animation synchronization. the icon will maintain size if map scale is below that number.92 required.

z. z. Category: OFP vectorUp obj Operand types: obj: Object Compatibility: Version 2.html 7/11/2010 .arma2.61 required.BIS Game Engine Scripting Commands Page 387 of 415 vectorDir obj Operand types: obj: Object Compatibility: Version 2. y].61 required. the unit is returned. If there is none. Category: OFP vehicle unit Operand types: unit: Object Type of returned value: Object Description: Returns the vehicle in which the given unit is mounted. Example: vehicle player != player Category: OFP unit vehicleChat chatText Operand types: unit: Object chatText: String Type of returned value: http://www. y]. Type of returned value: Array Description: Return object's up vector in world coordinates as [x. Type of returned value: Array Description: Return object's direction vector in world coordinates as [x.com/comref/full.

html 7/11/2010 .com/comref/full.92 required. Type of returned value: Array Description: Return a list of vehicles in the current mission. it does not broadcast the message. Example: soldierOne vehicleChat "Show this text" Category: OFP unit vehicleRadio radioName Operand types: unit: Object radioName: String Type of returned value: Nothing Description: Sends the message to the vehicle radio channel. you have to execute it on all of them.arma2. Example: soldierOne vehicleRadio "messageOne" Category: OFP vehicles Compatibility: Version 2.ext file or radio protocol. Example: _vehicles = vehicles Category: OFP vehicles Compatibility: Version 2. The message is defined in the description. If you want the message to show on all computers.BIS Game Engine Scripting Commands Page 388 of 415 Nothing Description: Types text to the vehicle radio channel.92 required. Type of returned value: Array Description: http://www. Note: this function only types text to the list.

91 required.91 required. Type of returned value: String Description: Returns the name of the variable which contains a reference to this object. Category: OFP http://www.html 7/11/2010 . y].BIS Game Engine Scripting Commands Page 389 of 415 Return a list of vehicles in the current mission. z.80 required. Type of returned value: Boolean Description: Check if file is signed by an accepted key. Category: OFP velocity vehicle Operand types: vehicle: Object Compatibility: Version 1. Type of returned value: Array Description: Returns the velocity (speed vector) of the vehicle as an array with format [x. Example: _vehicles = vehicles Category: OFP vehicleVarName object Operand types: object: Object Compatibility: Version 2.com/comref/full. Category: OFP verifySignature filename Operand types: filename: String Compatibility: Version 2.arma2.

Category: OFP waitUntil condition Operand types: condition: Code Compatibility: Version 2.html 7/11/2010 .60 required. Type of returned value: Nothing Description: Suspend execution of script until condition is satisfied.arma2. waitUntil {_i = _i + 1. Category: OFP visibleMap Compatibility: Version 5501 required. _i >= 100} Category: Default waypointAttachedObject waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. Type of returned value: Boolean Description: Return true if the main map is shown (active). Type of returned value: Number Description: Returns the rendering distance. Type of returned value: Object Description: Gets the object attached to the waypoint.BIS Game Engine Scripting Commands Page 390 of 415 viewDistance Compatibility: Version 5501 required. http://www. Example: _i = 0.com/comref/full.

1] Category: OFP waypointAttachedVehicle waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. Example: waypointAttachedVehicle [groupOne. 1] Category: OFP waypoint waypointAttachObject idStatic or object Operand types: waypoint: Array idStatic or object: Compatibility: Version 1.com/comref/full. 2] waypointAttachObject 1234 Category: OFP waypoint waypointAttachVehicle vehicle Operand types: waypoint: Array vehicle: Object Compatibility: Version 1.html 7/11/2010 . Type of returned value: Nothing http://www. Type of returned value: Nothing Description: Attaches a static object to the given waypoint.86 required.86 required.arma2.BIS Game Engine Scripting Commands Page 391 of 415 Example: waypointAttachedObject [groupOne. Type of returned value: Object Description: Gets the vehicle attached to the waypoint. Example: [grp.

Type of returned value: Number http://www.arma2. 1] Category: OFP waypointCombatMode waypoint Operand types: waypoint: Array Compatibility: Version 5500 required.BIS Game Engine Scripting Commands Page 392 of 415 Description: Attaches a vehicle to the given waypoint. Type of returned value: String Description: Gets the waypoint combat mode. Example: waypointCombatMode [groupOne.com/comref/full. Example: [grp. Type of returned value: String Description: Gets the waypoint behavior. 1] Category: OFP waypointCompletionRadius waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. 2] waypointAttachVehicle vehicle player Category: OFP waypointBehaviour waypoint Operand types: waypoint: Array Compatibility: Version 5500 required.html 7/11/2010 . Example: waypointBehaviour [groupOne.

Example: waypointFormation [groupOne. 1] Category: OFP waypointDescription waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. Example: waypointDescription [groupOne.arma2.html 7/11/2010 .com/comref/full. Type of returned value: String Description: Gets the waypoint formation. Type of returned value: Number http://www. 1] Category: OFP waypointHousePosition waypoint Operand types: waypoint: Array Compatibility: Version 5500 required.BIS Game Engine Scripting Commands Page 393 of 415 Description: Gets the radius around the waypoint where is the waypoint completed. Type of returned value: String Description: Gets the waypoint description. Example: _radius = waypointCompletionRadius [groupOne. 1] Category: OFP waypointFormation waypoint Operand types: waypoint: Array Compatibility: Version 5500 required.

BIS Game Engine Scripting Commands Page 394 of 415 Description: Gets the house position assigned to the waypoint. Waypoint uses format Waypoint. Type of returned value: Array Description: Return the list of waypoints for given group.com/comref/full. Example: waypointHousePosition [groupOne. http://www.50 required. Category: OFP waypointScript waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. Note: this function is identical to getWaypointPosition. 1] Category: OFP waypoints group Operand types: group: Object or Group Compatibility: Version 5129 required. Type of returned value: String Description: Gets the waypoint script. 1] Category: OFP waypointPosition waypoint Operand types: waypoint: Array Compatibility: Version 1.html 7/11/2010 . Type of returned value: Array Description: Gets the waypoint position. Example: waypointPosition [groupOne.arma2.

http://www. Type of returned value: Array Description: Gets the waypoint statements. Type of returned value: String Description: Gets the waypoint show/hide status.com/comref/full.BIS Game Engine Scripting Commands Page 395 of 415 Example: waypointScript [groupOne. 1] Category: OFP waypointStatements waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. 1] Category: OFP waypointShow waypoint Operand types: waypoint: Array Compatibility: Version 5500 required.html 7/11/2010 . Example: waypointShow [groupOne.arma2. 1] Category: OFP waypointSpeed waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. Type of returned value: String Description: Gets the waypoint speed. Example: waypointSpeed [groupOne.

Type of returned value: Array Description: Gets the waypoint timeout values.arma2.com/comref/full. Type of returned value: String Description: Gets the waypoint type. Type of returned value: Array Description: http://www.BIS Game Engine Scripting Commands Page 396 of 415 Example: waypointStatements [groupOne. 1] Category: OFP waypointTimeout waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. Example: waypointType [groupOne. 1] Category: OFP vehicle weaponDirection weaponName Operand types: vehicle: Object weaponName: String Compatibility: Version 2. 1] Category: OFP waypointType waypoint Operand types: waypoint: Array Compatibility: Version 5500 required. Example: waypointTimeout [groupOne.html 7/11/2010 .61 required.

arma2.html 7/11/2010 . Example: while "x<10" do {x=x+1} Category: Default http://www. Type of returned value: While Type Description: The first part of the while contruct. Example: weapons player Category: Resistance west Type of returned value: Side Description: The West side.85 required.BIS Game Engine Scripting Commands Page 397 of 415 Returns direction where is given weapon aiming. Category: OFP while condition Operand types: condition: Code Compatibility: Version 1.com/comref/full. Type of returned value: Array Description: Returns an array of names of all the vehicle's weapons. Example: _dir = _vehicle weaponDirection "M16" Category: OFP weapons vehicle Operand types: vehicle: Object Compatibility: Version 1.75 required.

92 required. Type of returned value: Array Description: http://www.html 7/11/2010 . Type of returned value: Array Description: Return the current wind vector. Example: with missionNamespace do {global=global+1} Category: Default worldName Compatibility: Version 2.arma2. Type of returned value: With Type Description: The first part of the with contruct.92 required. Category: OFP with namespace Operand types: namespace: Namespace Compatibility: Version 5501 required.BIS Game Engine Scripting Commands Page 398 of 415 wind Compatibility: Version 2.com/comref/full. Type of returned value: String Description: Return the name of the currently loaded world. Category: OFP object worldToModel worldPos Operand types: object: Object worldPos: Array Compatibility: Version 2.92 required.

Category: OFP worldToScreen position Operand types: position: Array Compatibility: Version 5501 required. Anything Description: Anything.com/comref/full.any value. Type of returned value: Array Description: Converts position in world space into screen (UI) space. Any Value Description: Any value. Array Description: An array of items. Category: OFP Any Description: Anyhing .html 7/11/2010 .BIS Game Engine Scripting Commands Page 399 of 415 Converts position from world space to object model space. http://www.arma2. Boolean Description: Boolean (true or false). each may be of any type. including nothing.

.code.}.arma2.Second usage: for [":initPhase:".code. Diary record Description: Diary record..html 7/11/2010 . Exception Type Description: A helper type used in try-catch constructs.}. Group http://www..com/comref/full..":updatePhase:"] do {. for type Description: This type handles for cycles. Usage of this type: for "_var" from :expr: to :expr: [step <expr>] do {. Config Description: Config file entry.BIS Game Engine Scripting Commands Page 400 of 415 Code Description: Part of code (compiled).. Display Description: Display UI object.":condition:". Control Description: Control UI object..

then constructs. Object Description: A game object (like a soldier. If Type Description: A helper type used in if. Nothing Description: Nothing .no value. http://www. Namespace Description: Namespace .html 7/11/2010 . Number Description: A real number. vehicle or building).arma2.com/comref/full. Number or Nothing Description: Number or Nothing.. Location Description: Location.set of variables.BIS Game Engine Scripting Commands Page 401 of 415 Description: A group.

east. its leader is considered.BIS Game Engine Scripting Commands Page 402 of 415 Object or Array Description: Object or Array. Orientation Description: Script Description: Side Description: The name of the side (see west.arma2.com/comref/full. http://www. Object or Group Description: Object or group. Object or String Description: Object or String. civilian and resistance). If you pass a group.html 7/11/2010 . String or Array Description: String or Array. String Description: An ASCII string.

Target Description: Task Description: Task.com/comref/full. Structured text Description: Switch Type Description: A helper type used in switch constructs. Text or String Description: Text or String. Transformation Description: Vector http://www.html 7/11/2010 .BIS Game Engine Scripting Commands Page 403 of 415 String or Code Description: String or Code.arma2.

html 7/11/2010 . RandomDirectionIntensity - http://www. g intensity of green. b intensity of blue and a alpha (1 . RotationVelocity.2] as a size then at the beginning the size of the particle will be 1 and at the end of the life time of the particle it's size will be 2. 1]. Category: OFP ParticleArray Format: [ShapeName. Random parameters: RandomDirectionPeriod .Name of the shape associated with the particle.I.Color of the particle in time to render (RGBA). The rest od the values during the life time will be lineary interpolated. LifeTime . g. Volume .Type of the particle (either "Billboard" or "SpaceObject").3D vector (xyz) which describes the velocity vector of the particle (direction and speed in m/s). Rubbing.BIS Game Engine Scripting Commands Page 404 of 415 Description: While Type Description: A helper type used in while. Color Format: [r. {angle}] Description: Global parameters: ShapeName . Size. All of them are fon interval [0. With Type Description: A helper type used in while. RandomDirectionPeriod. a] Description: Color. F.. MoveVelocity .The period of calling the "OnTimer" event (in sec).Float number without dimension which determines the impact of the density od the enviroment on this particle. RandomDirectionIntensity. 0 . RotationVelocity .. MoveVelocity.Volume of the particle (in m^3). TimerPeriod . AnimationName Name of the animation of the shape. Color. Rubbing . BeforeDestroy. b. Physical parameters: Position .do constructs. Position. TimerPeriod. Weight.com/comref/full. Color . AnimationPhase. LifeTime.no impact (vacuum). if you set the array [1. Object. OnTimer.Size of the particle in time to render (m).transparancy). Weight . Type.Either 3D coordinate (xzy) or name of the selection .Float number which determines number of rotations in one second.Phase of the animation in time.arma2.Weight of the particle (in kg).do constructs.Period of changing the velocity vector (s). AnimationName. Render parameters: Note that all these values are set as arrays to show their development in time. Type . Volume. Size .Life time of the particle (in sec). r is intensity of red. AnimationPhase .in this case the Object property must be set.

y] Description: Position. Position of the particle is stored in "this" variable.Object to bind this particle to.com/comref/full. OnTimer .z] or [x. BeforeDestroy . Position of the particle is stored in "this" variable. Category: OFP Position2D Format: [x. Category: OFP Position Format: [x. index selects the waypoint (index 0 selects the first waypoint which is always created on the group starting position). z coordinates are from South to North. y is the height above ground and the default y is 0.arma2.z. x coordinates are from East to West. Category: OFP Waypoint Format: [group.y] Description: Position.Name of the script to run right before destroying the particle. Category: OFP PositionASL Format: [x. RandomDirectionIntensity>.z.BIS Game Engine Scripting Commands Page 405 of 415 Each MoveVelocity component will be changed with random value from interval <0.index] Description: Group is of type Group. z coordinates are from South to North.Name of the script to run every period determined by TimerPeriod property. Category: OFP http://www. y is the height above see level. x coordinates are from East to West. Object .z] Description: x coordinates are from East to West.html 7/11/2010 . z coordinates are from South to North.

since 1. Each handler receives arguments in _this. You can force creating a copy of an array by using the unary operator +Array. "Killed" object:killer "Hit" object:causedBy. gunner] . Code is passed to them as a string and they interpret it as code if they wish.launched when the mission is started (before the briefing screen) .no arguments exit.arguments: [[r. Code strings Many languague constructs (including forEach.scalar:howMuch "Engine" bool:engineState "GetIn" string:position (1). While both ways are currently equivalent and a string constant is created.sqs . When b is changed.object:unit http://www.sqs . b is the light color Event handlers Event handlers can be defined in a unit config or by function addEventHandler.com/comref/full. Names of others are given by the program. after executing a = b both a and b represent the same array. g. as this makes scripts easier to read.50) or user action scripts). a is changed as well.launched when the mission is finished (before the debriefing screen.50) . init.sqs . if and while) use the concept of "code strings".launched when an illuminating shell is lit(since 1. b]. moreover future versions of the scripting language may precompile code enclosed in curled braces. Event based scripts There are some scripts in the game which are launched when a particular event occured. particle scripts (since 1.45) .arma2. g.argument: end # . Since 1. The event handler types are defined below.launched when the intro is started (since 1. _this select 0 is always the source of the event. One particular situation that can lead to this behaviour is aList = list sensor_name. we recommend to use curled braces for code only.no arguments initIntro.sqs .number of game endings onFlare.50) . Other argument types and meaning are defined below.r. Multiple handlers can be attached at one time.85 string constants can be written in two ways: using double quotes (like "Hello") or curled braces (like {a=a+1}). When b is an array.BIS Game Engine Scripting Commands Page 406 of 415 Array assignment Assignments used on arrays assign only a pointer to the same array to the target variable. Some of them have a name given by the mission designer (scripted waypoint.html 7/11/2010 .

arma2.com/comref/full. "commander". Main language contructs used in functions are: if.. do) is based on structured expressions and end-of-line has no special meaning.BIS Game Engine Scripting Commands Page 407 of 415 "GetOut" string:position (1). Scripts can wait suspended until a certain condition it met and they can also use goto to change the execution point at any time.string:muzzle.sqf) comment "Switch all infantry units to safe mode". then.else while.object:whoFired "Dammaged" string:selectionName.SQF While script syntax (see exec) is line based. "gunner". Semicolon is therefore required even when ending a line. private {"_a". "cargo" MP notes: "Killed" and "Hit" event handlers are executed where the given unit is local.. Note: scripts can do some things that are not possible in functions.html 7/11/2010 .scalar:howMuch "Gear" bool:gearState "Fuel" bool:fuelState "Init" No arguments (1) position can be "driver"."_b"}.string:mode. _a = _this select 0. This can be nothing when a function returns no value.sqf) comment "Return the maximum of the first and second argument". _b = _this select 1.. it is considered to be equivalent to a space.string:ammo "IncomingMissile" string:ammo.then. if (_a>_b) then {_a} else {_b} Example 2 (infantrySafe.object:unit "Fired" string:weapon. Functions . All other event handlers are executed on all computers. Events added by addEventHandler may be different on each computer.do Curled braces Multiple commands (including assigment commands) delimited with a semicolon The result of the last expression evaluated is returned as a function result. functions (see call. Example 1 (max. { if (vehicle _x == _x) then { _x setBehaviour "safe" } } forEach _this http://www.

'. Script syntax Each script line may be one of the following: Comment: line starting with '. To overcome this limitation you can store multiline in separate files and load them using the loadFile or preprocessFile functions (the second uses a C-like preprocessor with // or /* */ comments and #define macros).html 7/11/2010 .com/comref/full. All local variables from outer scopes are visible as well. forEach. http://www. Local variables can be used during script execution to avoid variable conflicts. A local variable name starts with an underscore ('_'). Example: _a = 10 Conditional: ? condition : command or assignmented. exec and call define a visibility scope for local variables. &__waitUntil Command: any expression returning no value.BIS Game Engine Scripting Commands Page 408 of 415 Due to the line-based nature of scripts it is not possible to create multiline string constants in them.arma2. it is created in the innermost scope. Each of the commands then. Example: .This is comment Label: line starting with '#'.SQF (as opposed to . Example: @condition Waiting for a time: line starting with '&'. You can use function private to introduce variables at any given scope.SQS used for scripts). Local variables A local variable is any variable which name starts with an underscore. Variables starting with two underscores are reserved and should never be used. while. Example: ~delay is equivalent to __waitUntil = _time+(cas) . count. Example: _unit setBehaviour "safe" Assignment: assignment of any value to variable. Example: ?_condVar>10:_var=_var+2 Note: variable _time is reserved. do. All other variables are global. If assignment is made into a variable that does not exist in any visible scope. Example: &endTime is equivalent to @_time >= (endTime) Delay: line starting with '~'. The recommended file extension for functions is . Example: #LabelName Waiting for a condition: line starting with '@'. It is used to keep the time elapsed since the script execution started. the command is executed only when the condition is satisfied.

Variable denoting trigger can be created by filling in the name field. When an undefined value is encountered in a field where a boolean value is expected. Array variable thisList is set to the list of all vehicles that would satisfy the primary sensor activation condition. Boolean variable this is set during evaluation of the condition expression to the primary sensor activation condition. The On Activation and On Deactivation expressions define actions that are peformed when the trigger condition changes to true or false. it is converted to false. The On Activation expression defines an action that is peformed after the waypoint is terminated.html 7/11/2010 . Variables Variables have to be inicialized before being used. Array variable thisList is set to the list of all units in the group that the given waypoint is assigned to. Condition must return a boolean value.arma2.BIS Game Engine Scripting Commands Page 409 of 415 Triggers The Condition expression is used to determine when the trigger is activated. The expression must either be an assignment or return nothing (see type none). Variables may be unitialized by assigning it the nil value. This effectively destroys the variable as if it never existed. Waypoints The Condition expression is used to determine when the waypoint execution is terminated. Boolean variable this is set during evaluation of the condition expression to the primary waypoint termination condition. When any uninitialized variable is detected in any expression.com/comref/full. the whole expression results nil (an undefined value). Expressions must either be an assignment or return nothing (see type none). Condition must return a boolean value. Vehicle Config entry: CfgVehicles Value All Logic Land Car Motorcycle Tank APC Man Civilian Civilian2 Civilian3 Description any vehicle game logic invisible unit ground vehicle + + + + http://www.

BIS Game Engine Scripting Commands Page 410 of 415 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Soldier SoldierLAW Air Helicopter Plane Ship SmallShip BigShip Jeep JeepMG Rapid RapidY Skoda SkodaBlue SkodaRed SkodaGreen Tractor Truck Truck5t Truck5tOpen Truck5tRepair Truck5tReammo Truck5tRefuel SoldierWB SoldierWG SoldierWMedic SoldierWCrew SoldierWPilot SoldierWMG SoldierWLAW SoldierWAT SoldierWAA SoldierWMortar SoldierWSniper SoldierWSaboteurPipe SoldierWSaboteurDay SoldierWMiner OfficerW SoldierWCaptive M1Abrams M60 M113 M113Ambul Cobra Ch47D air vehicle helicopter airplane 5 ton truck basic western soldier western soldier with grenade launcher western soldier with machine gun western soldier with LAW launcher western soldier with guided AT missile western soldier with AA missile western soldier with riffle grenade http://www.arma2.html 7/11/2010 .com/comref/full.

BIS Game Engine Scripting Commands Page 411 of 415 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ParachuteEast ParachuteWest ParachuteC ParachuteG UH60 UH60MG Su25 A10 Cessna BoatW M2StaticMG UAZ Ural UralRepair UralReammo UralRefuel Scud SoldierEB SoldierWFakeE SoldierEG SoldierEMedic SoldierECrew SoldierEPilot SoldierEMG SoldierELAW SoldierEAT SoldierEAA SoldierEMiner OfficerE OfficerENight GeneralE Angelina SoldierESniper SoldierESaboteurPipe SoldierEFakeW LaserTarget BMP BMPAmbul RussianTank T72 T80 ZSU M2StaticMGE Mi24 Mi17 laser designator dot http://www.com/comref/full.arma2.html 7/11/2010 .

com/comref/full.html 7/11/2010 .arma2.BIS Game Engine Scripting Commands Page 412 of 415 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CarrierW BoatE TruckV3SG GJeep TruckV3SCivil TruckV3SGRefuel TruckV3SGRepair TruckV3SGReammo UAZG SGUAZG SoldierGB SoldierGMedic SoldierGCrew SoldierGPilot SoldierGG SoldierGMG SoldierGLAW SoldierGAT SoldierGAA OfficerG OfficerGNight SoldierGFakeE SoldierGFakeC SoldierGFakeC2 T55G Static static object or building ReammoBox ReammoBoxWest ReammoBoxEast ReammoBoxGuer HeavyReammoBox HeavyReammoBoxWest HeavyReammoBoxEast HeavyReammoBoxRes MachineGunBox FlagCarrier Danger Fire Target TargetE Camp Fortress1 Fortress2 CampEmpty CampEast http://www.

BIS Game Engine Scripting Commands Page 413 of 415 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CampEastC Grave GraveCross1 GraveCross2 GraveCrossHelmet ACamp MASH Fence FenceWood Wire WireFence Barrels Barrel1 Barrel2 Barrel3 Barrel4 Table Tablemap Chair Phone Camera1 Computer ChairHangar ChairX VideoTable TablePub Radio ChairSmall Crawling ExcerciseTrack ExcerciseTrack2 ExcerciseTrack3 Paleta1 Paleta2 JeepWreck1 JeepWreck2 JeepWreck3 M113Wreck UralWreck Body Shed Office Barracks Hangar Hangar_Hall http://www.html 7/11/2010 .arma2.com/comref/full.

arma2.html 7/11/2010 .BIS Game Engine Scripting Commands Page 414 of 415 + + + + + + + Hangar_Office ShedSmall HeliH HeliHEmpty TargetTraining TargetGrenade FuelStation fuel station building Weapons and magazines Config entry: CfgWeapons Value Description Shell73 Heat73 Gun73 Shell105 Heat105 Gun105 Shell120 Heat120 Gun120 Shell125 Heat125 Gun125 MGun Riffle StrokeFist M16 M4 AK47 AK47CZ AK74 AK74SU HK SniperRiffle M21 SVDDragunov Binocular NVGoggles MachineGun7_6 MachineGun7_6Manual M60 PK MachineGun12_7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.com/comref/full.

arma2.BIS Game Engine Scripting Commands Page 415 of 415 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browning MachineGun30 MachineGun30A10 ZsuCannon GrenadeLauncher RiffleGrenadeLauncher M16GrenadeLauncher AK47GrenadeLauncher AK74GrenadeLauncher Mortar Flare FlareGreen FlareRed HandGrenade SmokeShell SmokeShellRed SmokeShellGreen Put Mine MineE PipeBomb LAWLauncher RPGLauncher CarlGustavLauncher AT4Launcher AALauncher 9K32Launcher AT3Launcher HellfireLauncher ZuniLauncher38 Rocket57x64 Rocket57x192 HellfireLauncherCobra HellfireLauncherHind MaverickLauncher CarHorn TruckHorn SportCarHorn http://www.html 7/11/2010 .com/comref/full.