Operand types:
Type of returned value:
Description:
Absolute value of x.
Used In:
OFP/ArmA
Example:
_a = abs -3 ..........Result is 3
Add a Comment
Enter your comment:
Operand types:
None
Type of returned value:
Description:
Current time acceleration factor.
Used In:
OFP/ArmA
Example:
_eTime = acctime
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Arccosine of x, result in degrees.
Used In:
OFP/ArmA
Example:
_angle = acos 0.5 ..........Result is 60
Add a Comment
Enter your comment:
Operand types:
unit:
Objectaction:
Array
Type of returned value:
Description:
Make unit preform an action.
Format of action may be [type, target, param1, param2, param3].
Only type is required, target defaults to unit, param1, param2, param3 are type specific.
Used In:
OFP/ArmA
Example:
soldierOne action ["eject", vehicle soldierOne]
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Returns a list of dikCodes of buttons assigned to the given user action.
Used In:
ArmA
Example:
array = actionKeys "ReloadMagazine"
Add a Comment
Enter your comment:
actionKeysImages
[action, maxKeys]
Operand types:
Type of returned value:
Description:
Returns a list of button images or names assigned to the given user action.
A maximum of maxKeys keys is listed.
You can find the action names in config class ControllerSchemes.
Used In:
ArmA
Example:
text = actionKeysImages "ReloadMagazine"
Add a Comment
Enter your comment:
actionKeysNames
[action, maxKeys]
Operand types:
Type of returned value:
Description:
Returns a list of button names assigned to the given user action.
A maximum of maxKeys keys is listed.
You can find the action names in config class ControllerSchemes.
Used In:
ArmA
Example:
list = actionKeysNames "ReloadMagazine"
Add a Comment
Enter your comment:
activateAddons
[addon1, ...]
Operand types:
Type of returned value:
Description:
Activates the listed addons.
The list of active addons is initialized during this function.
Used In:
ArmA
Example:
activateAddons ["BISOFP"]
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Activates the given key for the current user profile.
The keys are used to unlock missions or campaigns.
See keys, keysLimit and doneKeys in the description.ext file of the missions.
Used In:
ArmA
Example:
activateKey "M04"
Add a Comment
Enter your comment:
unit addAction
[action, script filename, (arguments, priority, showWindow, hideOnUse, shortcut)]
Operand types:
unit:
Object[action, script filename, (arguments, priority, showWindow, hideOnUse, shortcut)]:
Array
Type of returned value:
Description:
Creates an action.
Action ID should be returned, but due to bug it is not.
To determine action ID use following algorithm:
First action added to given vehicle has ID zero, next has ID 1, etc.
Used In:
OFP/ArmA
Example:
player addAction ["Hello", "hello.sqs"]
Add a Comment
Enter your comment:
object addEventHandler
handler
Operand types:
object:
Objecthandler:
Array
Type of returned value:
Description:
Format of handler is [type,command].
Check scripting topic Event handlers for more information.
Index of currently added handler is returned.
Used In:
OFP/ArmA
Example:
player addEventHandler ["killed",{_this exec "playerKilled.sqs"}]
Add a Comment
Enter your comment:
unitName addLiveStats
score
Operand types:
unitName:
Objectscore:
Number
Type of returned value:
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).
Used In:
OFP/ArmA
Example:
player addLiveStats 12
Add a Comment
Enter your comment:
unit addMagazine
weaponName
Operand types:
unit:
ObjectweaponName:
String
Type of returned value:
Description:
Add magazine to unit.
Note: You can create invalid combinations with this function like 20 grenades.
When doing so, application behaviour is undefined.
Used In:
OFP/ArmA
Example:
player addMagazine "M16"
Add a Comment
Enter your comment:
unit addMagazineCargo
magazines
Operand types:
unit:
Objectmagazines:
Array
Type of returned value:
Description:
Add magazines to weapon cargo space.
Used for infantry weapons.
Format of magazines is [magazineName, count].
For magazineName values see
OFPWeapons or
ArmAWeapons.
Used In:
OFP/ArmA
Example:
rearmTruckOne addMagazineCargo ["M16",10]
Add a Comment
Enter your comment:
addMagazinePool
magazineType
Operand types:
Type of returned value:
Description:
Adds count magazines of type name into magazine pool.
Used in campaign to transfer magazines into next mission.
Used In:
OFP/ArmA
Example:
addMagazinePool ["M16",10]
Add a Comment
Enter your comment:
variableName addPublicVariableEventHandler
code
Operand types:
variableName:
Stringcode:
Code
Type of returned value:
Description:
If the EH detects a change via publicVariable on the given variableName, code will be executed.
The following arguments are transferred to the code:
* _this select 0: variableName
* _this select 1: New variable value
Used In:
ArmA
Example:
"mypublicVar" addPublicVariableEventHandler {hint ((_this select 0) + " has been modified to: " + str (_this select 1))}
Add a Comment
Enter your comment:
unitName addRating
number
Operand types:
unitName:
Objectnumber:
Number
Type of returned value:
Description:
Add number to unit rating.
This is usually used to reward for completed mission objectives.
Rating for killed enemies and killed friendlies is adjusted automatically.
When rating is lower than zero, unit is consider "renegade" and is enemy to everyone.
Used In:
OFP/ArmA
Example:
player addRating 1000
Add a Comment
Enter your comment:
Operand types:
unitName:
Objectscore:
Number
Type of returned value:
Description:
MP only: Add unit score.
This is shown in the "I" MP screen as total.
Used In:
OFP/ArmA
Example:
player addScore 10
Add a Comment
Enter your comment:
addSwitchableUnit
unitName
Operand types:
Type of returned value:
Description:
Add a unit into the list of units available for team switch.
Used In:
ArmA
Example:
Add a Comment
Enter your comment:
groupName addVehicle
vehicleName
Operand types:
groupName:
GroupvehicleName:
Object
Type of returned value:
Description:
Adds the specified vehicle to the specified group.
Used In:
ArmA
Example:
Add a Comment
Enter your comment:
groupName addWaypoint
[center, radius]
Operand types:
groupName:
Group[center, radius]:
Array
Type of returned value:
Description:
Adds a new waypoint to a group.
The waypoint is placed randomly in a circle with the given center and radius.
The function returns a waypoint with format [group, index].
Used In:
ArmA
Example:
grp addWaypoint [position player, 0]
Add a Comment
Enter your comment:
unitName addWeapon
weaponName
Operand types:
unitName:
ObjectweaponName:
String
Type of returned value:
Description:
Add weapon to unit.
Note: You can create invalid combinations with this function, for example by adding two rifles.
When doing so, application behaviour is undefined.
Used In:
OFP/ArmA
Example:
player addWeapon "AK74"
Add a Comment
Enter your comment:
unitName addWeaponCargo
weaponName
Operand types:
unitName:
ObjectweaponName:
Array
Type of returned value:
Description:
Add weapons to weapon cargo space.
Used for infantry weapons.
Format of weapons is [weaponName, count].
For weaponName values see
OFPWeapons or
ArmAWeapons.
Used In:
OFP/ArmA
Example:
rearmTruckOne addWeaponCargo ["M16",10]
Add a Comment
Enter your comment:
addWeaponPool
[name, count]
Operand types:
Type of returned value:
Description:
Adds count weapons of type name into weapon pool.
Used in campaign to transfer weapons into next mission.
Used In:
OFP/ArmA
Example:
addWeaponPool ["M16",10]
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Returns which side an airfield is assigned to.
Following id numbers apply:
0 - Paraiso
1 - Rahmadi
2 - Pita
3 - Antigua
Used In:
ArmA
Example:
airportSide 3
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Check if given person, vehicle or building is not dead / destroyed.
Used In:
OFP/ArmA
Example:
? (alive player) : _b = 1
Add a Comment
Enter your comment:
objectName allowDammage
allow
Operand types:
objectName:
Objectallow:
Boolean
Type of returned value:
Description:
Obsolete command.
Used In:
OFP/ArmA
Example:
Add a Comment
Enter your comment:
unitName allowFleeing
courage
Operand types:
unitName:
Objectcourage:
Number
Type of returned value:
Description:
Set group courage.
The less courage, the sooner will group start fleeing.
0 means maximum courage, 1 means always fleeing.
Used In:
OFP/ArmA
Example:
soldierOne allowFleeing 0
Add a Comment
Enter your comment:
unitArray allowGetIn
allow
Operand types:
unitArray:
Arrayallow:
Boolean
Type of returned value:
Description:
Allow getting in vehicles to all units in the list.
Used In:
OFP/ArmA
Example:
[unitOne, unitTwo] allowGetIn false
Add a Comment
Enter your comment:
Operand types:
unitName:
Objectmagazine:
String
Type of returned value:
Description:
Count how many shots are left for given magazine type.
Used In:
OFP/ArmA
Example:
player ammo "M16"
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
a and b
Used In:
OFP/ArmA
Example:
(alive player) and (alive leader player)
Add a Comment
Enter your comment:
objectName animate
[animation, phase]
Operand types:
objectName:
Object[animation, phase]:
Array
Type of returned value:
Description:
Process animation on object.
Animation is defined in config file.
Wanted animation phase is set to phase.
Used In:
OFP/ArmA
Example:
house animate ["doors1", 1]
Add a Comment
Enter your comment:
objectName animationPhase
animation
Operand types:
objectName:
Objectanimation:
String
Type of returned value:
Description:
Return animation phase of animation on object.
Used In:
OFP/ArmA
Example:
house animationPhase "doors1"
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Return the name of the current primary animation.
Used In:
ArmA
Example:
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
None
Description:
Arcsine of x, result in degrees.
Used In:
OFP/ArmA
Example:
_angle = asin 0.5 ..........Result is 30
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Tests a condition and if the condition is false, halts the program.
Used In:
ArmA
Example:
assert (_x>0)
Add a Comment
Enter your comment:
unitName assignAsCargo
vehicleName
Operand types:
unitName:
ObjectvehicleName:
Object
Type of returned value:
Description:
Assign soldier into cargo / passenger space of given vehicle.
Used In:
OFP/ArmA
Example:
player assignAsCargo truckOne
Add a Comment
Enter your comment:
unitName assignAsCommander
vehicleName
Operand types:
unitName:
ObjectvehicleName:
Object
Type of returned value:
Description:
Assign soldier as commander of given vehicle.
Used In:
OFP/ArmA
Example:
player assignAsCommander tankOne
Add a Comment
Enter your comment:
unitName assignAsDriver
vehicleName
Operand types:
unitName:
ObjectvehicleName:
Object
Type of returned value:
Description:
Assign soldier as driver of given vehicle.
Used In:
OFP/ArmA
Example:
player assignAsDriver tankOne
Add a Comment
Enter your comment:
unitName assignAsGunner
vehicleName
Operand types:
unitName:
ObjectvehicleName:
Object
Type of returned value:
Description:
Assign soldier as gunner of given vehicle.
Used In:
OFP/ArmA
Example:
player assignAsGunner tankOne
Add a Comment
Enter your comment:
assignedTarget
vehicleName
Operand types:
Type of returned value:
Description:
Return the target assigned to the vehicle.
Used In:
ArmA
Example:
Add a Comment
Enter your comment:
assignedVehicle
vehicleName
Operand types:
Type of returned value:
Description:
Returns the vehicle that a unit is assigned to.
Used In:
ArmA
Example:
assignedVehicle fred
Add a Comment
Enter your comment:
assignedVehicleRole
unitName
Operand types:
Type of returned value:
Description:
Returns the role that a unit is assigned to within its assigned vehicle. The array which is returned can contain:
[] - Not assigned to any vehicle
["Driver"] - Assigned as driver
["Cargo"] - Assigned as cargo
["Turret", [turret path]] - Assigned to a turret
Used In:
ArmA
Example:
assignedVehicleRole fred
Add a Comment
Enter your comment:
vehicleName assignTeam
team
Operand types:
vehicleName:
Objectteam:
String
Type of returned value:
Description:
Assigns the vehicle (specifically its commander unit) to the given team.
The possible team values are:
"MAIN"
"RED"
"GREEN"
"BLUE"
"YELLOW"
Used In:
ArmA
Example:
soldier2 assignTeam "RED"
Add a Comment
Enter your comment:
Operand types:
None
Type of returned value:
None
Description:
assignToAirport used to do the same as landAt.
Now it assigns for purpose of future getout commands.
Do not use till it is fully implemented at some future date.
Used In:
ArmA
Example:
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Arctangens of x, result in degrees.
Used In:
OFP/ArmA
Example:
_angle = atan 1 ..........Result is 45
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Returns the arctangens of x/y.
Returned value is in degrees, in the range -180 to +180, using the signs of both parameters to determine the quadrant of the return value.
Used In:
OFP/ArmA
Example:
_angle = 5 atan2 3 ..........Result is 59.0362
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Arctangens of x, result in degrees.
Used In:
OFP/ArmA
Example:
_angle = atg 1 ..........Result is 45
Add a Comment
Enter your comment:
Operand types:
Type of returned value:
Description:
Return whether leader can issue attack
Used In:
ArmA
Example:
Add a Comment
Enter your comment:
23 Nov 2007
macgubaNot to be confused with skipTime.