פקודות סקריפט

ראשי >פקודות סקריפט
ARMA רשימת פעולות
רשימת פעולות בARMED ASSAULT
מפיעלים עי שורת סקריפט
soldier action ["eject", vehicle soldier[

 .1 AUTOHOVER
.2 CANCELACTION
.3 CANCELLAND
.4 CANCELTAKEFLAG
.5 DEACTIVATE
.6 DEACTIVATEMINE
.7 DIARY
.8 DROPWEAPON / DROPMAGAZINE
.9 EJECT
.10 ENGINEON / ENGINEOFF
.11 FIREINFLAME / FIREPUTDOWN
.12 FLAPSUP / FLAPSDOWN
.13 GETINCOMMANDER / GETINDRIVER/ GETINGUNNER / GETINCARGO / GETINPILOT
.14 GETOUT
.15 HANDGUNON / HANDGUNOFF
.16 HEAL
.17 HIDEBODY
.18 INGAMEMENU
.19 LADDERDOWN / LADDERUP
.20 LADDEROFF
.21 LADDERONUP / LADDERONDOWN
.22 LAND
.23 LANDGEAR
.24 LIGHTOFF / LIGHTON
.25 LOADMAGAZINE
.26 MANUALFIRE
.27 MARKENTITY
.28 MOVETOCARGO / MOVETOCOMMANDER / MOVETODRIVER / MOVETOGUNNER / MOVETOPILOT
.29 NONE
.30 NVGOGGLES / NVGOGGLESOFF
.31 REARM / REFUEL / REPAIR
.32 RETURNFLAG
. SALUTE33
.34 SCUD LAUNCH / SCUD START / SCUD CANCEL
.35 SETTIMER
.36 SITDOWN
.37 STROKEFIST
.38 STROKEGUN
.39 SWITCHWEAPON
.40 TAKEFLAG
.41 TAKEMAGAZINE / TAKEWEAPON
.42 TAKEMINE
.43 TALK
.44 TOUCHOFF
.45 TURNIN / TURNOUT
.46 USEMAGAZINE
.47 USER
.48 USERTYPE
.49 USEWEAPON
.50 WEAPONINHAND / WEAPONONBACK

מבוא

Introduction

 

Scripting is a very important tool in creating good missions or addons. Scripts can be excuted from a trigger, or in the init field of a player or object, or even executed inside other scripts. A script is a simple text file, with an extension of .sqs or .sqf. A simple example of executing a script in the player init field would look something like this: [argument] exec "myscript.sqs" (for SQS scripts) nul = [argument] execVM "myscript.sqf" (for SQF scripts)
A-D
A
Index
abs
accTime
acos
action
actionKeys
actionKeysImages
actionKeysNames
activateAddons
activateKey
addAction
addEventHandler
addLiveStats
addMagazine
addMagazineCargo
addMagazinePool
addRating
addScore
addSwitchableUnit
addVehicle
addWaypoint
addWeapon
addWeaponCargo
addWeaponPool
airportSide
alive
allowDammage
allowFleeing
allowGetIn
ammo
and
animate
animationPhase
animationState
asin
assert
assignAsCargo
assignAsCommander
assignAsDriver
assignAsGunner
assignedTarget
assignedVehicle
assignedVehicleRole
assignTeam
assignToAirport
atan
atan2
atg
attackEnabled
abs x
Operand types:
x: Number
Type of returned value:
Number
Description:
Absolute value of x.
Used In:
ArmA/OFP
Example:
_a = abs -3 ..........Result is 3
--------------------------------------------------------------------------------
accTime
Operand types:
None
Type of returned value:
Number
Description:
Current time acceleration factor.
Used In:
ArmA/OFP
Example:
_eTime = acctime
macguba
Use setAccTime to change the time acceleration factor.
Not to be confused with skipTime.

--------------------------------------------------------------------------------
acos x
Operand types:
x: Number
Type of returned value:
Number
Description:
Arccosine of x, result in degrees.
Used In:
ArmA/OFP
Example:
_angle = acos 0.5 ..........Result is 60
--------------------------------------------------------------------------------
unit action action
Operand types:
unit: Object
action: Array
Type of returned value:
Nothing
Description:
Make unit peform 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:
ArmA/OFP
Example:
soldierOne action ["eject", vehicle soldierOne]
--------------------------------------------------------------------------------
actionKeys action
Operand types:
action: String
Type of returned value:
Array
Description:
Returns a list of dikCodes of buttons assigned to the given user action.
Used In:
ArmA
Example:
array = actionKeys "ReloadMagazine"
« To Menu
--------------------------------------------------------------------------------
actionKeysImages action or [action, maxKeys]
Operand types:
action or [action, maxKeys]: String or Array
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.
You can find the action names in config class ControllerSchemes.
Used In:
ArmA
Example:
text = actionKeysImages "ReloadMagazine"
--------------------------------------------------------------------------------
actionKeysNames action or [action, maxKeys]
Operand types:
action or [action, maxKeys]: String or Array
Type of returned value:
String
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"
--------------------------------------------------------------------------------
activateAddons [addon1, ...]
Operand types:
[addon1, ...]: Array
Type of returned value:
Nothing
Description:
Activates the listed addons.
The list of active addons is initialized during this function.
Used In:
ArmA
Example:
activateAddons ["BISOFP"]
« To Menu
--------------------------------------------------------------------------------
activateKey keyName
Operand types:
keyName: String
Type of returned value:
Nothing
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"
--------------------------------------------------------------------------------
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:
Number or Nothing
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:
ArmA/OFP
Example:
player addAction ["Hello", "hello.sqs"]
Tactician
It seems that since 1.85+(?) addAction has correctly returned action ID although the comref doesn't reflect this.
Params passed by an action to the executed script:
[(object action was attached to), (unit that activated action), (index of action)]
So an example of an action-based script goes like this:
_obj = _this select 0
_man = _this select 1
_index = _this select 2
If you want to remove the action from the object immediately after it's triggered, use this line along with the above:
_obj removeAction _index
toadlife
An easy way to keep track of and remove actions is to set the ID of the action yourself.
This can be accomplished by doing the following:
myaction = player addAction ["Hello", "hello.sqs"]
This sets the actions ID to "myaction".
This can make keeping track actions much easier.
To remove the above action, you would use the following line:
player removeAction myaction
« To Menu
--------------------------------------------------------------------------------
object addEventHandler handler
Operand types:
object: Object
handler: Array
Type of returned value:
Number or Nothing
Description:
Format of handler is [type,command].
Check scripting topic Event handlers for more information.
Index of currently added handler is returned.
Used In:
ArmA/OFP
Example:
player addEventHandler ["killed",{_this exec "playerKilled.sqs"}]
General Barron
Check here for more info on eventhandlers.
--------------------------------------------------------------------------------
unit addLiveStats score
Operand types:
unit: Object
score: Number
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).
Used In:
OFP ELITE
Example:
player addLiveStats 12
« To Menu
--------------------------------------------------------------------------------
unit addMagazine weaponName
Operand types:
unit: Object
weaponName: String
Type of returned value:
Nothing
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:
ArmA/OFP
Example:
player addMagazine "M16"
macguba
If the unit has magazines already, you may need to use the commands removeMagazine or removeMagazines to make space for the mags you want to add.
--------------------------------------------------------------------------------
unit addMagazineCargo magazines
Operand types:
unit: Object
magazines: Array
Type of returned value:
Nothing
Description:
Add magazines to weapon cargo space.
Used for infantry weapons.
Format of magazines is [magazineName, count].
For magazineName values see CfgWeapons.
Used In:
ArmA/OFP
Example:
rearmTruckOne addMagazineCargo ["M16",10]
« To Menu
--------------------------------------------------------------------------------
addMagazinePool Null
Operand types:
Null: Array
Type of returned value:
Nothing
Description:
Adds count magazines of type name into weapon pool.
Used in campaign to transfer weapons into next mission.
Used In:
ArmA/OFP
Example:
addMagazinePool ["M16",10]
--------------------------------------------------------------------------------
unit addRating number
Operand types:
unit: Object
number: Number
Type of returned value:
Nothing
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:
ArmA/OFP
Example:
player addRating 1000
« To Menu
--------------------------------------------------------------------------------
unit addScore score
Operand types:
unit: Object
score: Number
Type of returned value:
Nothing
Description:
MP only: Add unit score.
This is shown in the "I" MP screen as total.
Used In:
ArmA/OFP
Example:
player addScore 10
--------------------------------------------------------------------------------
addSwitchableUnit person
Operand types:
person: Object
Type of returned value:
Nothing
Description:
Add a unit into the list of units available for team switch.
Used In:
ArmA
--------------------------------------------------------------------------------
group addVehicle vehicle
Operand types:
group: Group
vehicle: Object
Type of returned value:
Nothing
Description:
Adds the specified vehicle to the specified group.
Used In:
ArmA
--------------------------------------------------------------------------------
group addWaypoint [center, radius]
Operand types:
group: Group
[center, radius]: Array
Type of returned value:
Array
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]
« To Menu
--------------------------------------------------------------------------------
unit addWeapon weaponName
Operand types:
unit: Object
weaponName: String
Type of returned value:
Nothing
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:
ArmA/OFP
Example:
player addWeapon "AK74"
macguba
To ensure that the weapon is loaded at the start of the mission, add at least one magazine (addMagazine) before adding the weapon.
The real Armstrong
To remove weapons use the removeallweapons or the removeweapon commands.
--------------------------------------------------------------------------------
unit addWeaponCargo weapons
Operand types:
unit: Object
weapons: Array
Type of returned value:
Nothing
Description:
Add weapons to weapon cargo space.
Used for infantry weapons.
Format of weapons is [weaponName, count].
For weaponName values see CfgWeapons.
Used In:
ArmA/OFP
Example:
rearmTruckOne addWeaponCargo ["M16",10]
« To Menu
--------------------------------------------------------------------------------
addWeaponPool [name, count]
Operand types:
[name, count]: Array
Type of returned value:
Nothing
Description:
Adds count weapons of type name into weapon pool.
Used in campaign to transfer weapons into next mission.
Used In:
ArmA/OFP
Example:
addWeaponPool ["M16",10]
--------------------------------------------------------------------------------
airportSide id
Operand types:
id: Number
Type of returned value:
Side
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
--------------------------------------------------------------------------------
alive obj
Operand types:
obj: Object
Type of returned value:
Boolean
Description:
Check if given person, vehicle or building is not dead / destroyed.
Used In:
ArmA/OFP
Example:
? (alive player) : _b = 1
--------------------------------------------------------------------------------
obj allowDammage allow
Operand types:
obj: Object
allow: Boolean
Type of returned value:
Nothing
Description:
Obsolete command.
Used In:
OFP
« To Menu
--------------------------------------------------------------------------------
unit allowFleeing courage
Operand types:
unit: Object or Group
courage: Number
Type of returned value:
Nothing
Description:
Set group courage.
The less courage, the sooner will group start fleeing.
0 means maximum courage, 1 means always fleeing.
Used In:
ArmA/OFP
Example:
soldierOne allowFleeing 0
--------------------------------------------------------------------------------
unitArray allowGetIn allow
Operand types:
unitArray: Array
allow: Boolean
Type of returned value:
Nothing
Description:
Allow getting in vehicles to all units in the list.
Used In:
ArmA/OFP
Example:
[unitOne, unitTwo] allowGetIn false
« To Menu
--------------------------------------------------------------------------------
unit ammo magazine
Operand types:
unit: Object
magazine: String
Type of returned value:
Number
Description:
Count how many shots are left for given magazine type.
Used In:
ArmA/OFP
Example:
player ammo "M16"
--------------------------------------------------------------------------------
a and b
Operand types:
a: Boolean
b: Boolean
Type of returned value:
Boolean
Description:
a and b
Used In:
ArmA/OFP
Example:
alive player and alive leader player
--------------------------------------------------------------------------------
object animate [animation, phase]
Operand types:
object: Object
[animation, phase]: Array
Type of returned value:
Nothing
Description:
Process animation on object.
Animation is defined in config file.
Wanted animation phase is set to phase.
Used In:
ArmA/OFP
Example:
house animate ["doors1", 1]
« To Menu
--------------------------------------------------------------------------------
object animationPhase animation
Operand types:
object: Object
animation: String
Type of returned value:
Number
Description:
Return animation phase of animation on object.
Used In:
ArmA/OFP
Example:
house animationPhase "doors1"
--------------------------------------------------------------------------------
animationState man
Operand types:
man: Object
Type of returned value:
String
Description:
Return the name of the current primary animation.
Used In:
ArmA
--------------------------------------------------------------------------------
asin x
Operand types:
x: Number
Type of returned value:
Number
Description:
Arcsine of x, result in degrees.
Used In:
ArmA/OFP
Example:
_angle = asin 0.5 ..........Result is 30
« To Menu
--------------------------------------------------------------------------------
assert condition
Operand types:
condition: Boolean
Type of returned value:
Boolean
Description:
Tests a condition and if the condition is false, halts the program.
Used In:
ArmA
Example:
assert (_x>0)
--------------------------------------------------------------------------------
soldier assignAsCargo vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Assign soldier into cargo / passenger space of given vehicle.
Used In:
ArmA/OFP
Example:
player assignAsCargo truckOne
macguba
To make the unit get into the vehicle you will need to use the command orderGetIn after you have issued the assignAs command.
« To Menu
--------------------------------------------------------------------------------
soldier assignAsCommander vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Assign soldier as commander of given vehicle.
Used In:
ArmA/OFP
Example:
player assignAsCommander tankOne
--------------------------------------------------------------------------------
soldier assignAsDriver vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Assign soldier as driver of given vehicle.
Used In:
ArmA/OFP
Example:
player assignAsDriver tankOne
« To Menu
--------------------------------------------------------------------------------
soldier assignAsGunner vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Assign soldier as gunner of given vehicle.
Used In:
ArmA/OFP
Example:
player assignAsGunner tankOne
--------------------------------------------------------------------------------
assignedTarget vehicle
Operand types:
vehicle: Object
Type of returned value:
Object
Description:
Return the target assigned to the vehicle.
Used In:
ArmA
--------------------------------------------------------------------------------
assignedVehicle vehicle
Operand types:
vehicle: Object
Type of returned value:
Object
Description:
Returns the vehicle that a unit is assigned to.
Used In:
ArmA
Example:
assignedVehicle fred
--------------------------------------------------------------------------------
assignedVehicleRole vehicle
Operand types:
vehicle: Object
Type of returned value:
Array
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
--------------------------------------------------------------------------------
vehicle assignTeam team
Operand types:
vehicle: Object
vehicle: String
Type of returned value:
Nothing
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"
« To Menu
--------------------------------------------------------------------------------
assignToAirport
Operand types:
:
Type of returned value:
Description:
Not yet fully implemented, at the moment it does the same as landAt.
Do not use till it is fully implemented at some future date.
Used In:
ArmA
Example:
assignToAirport
--------------------------------------------------------------------------------
atan x
Operand types:
x: Number
Type of returned value:
Number
Description:
Arctangens of x, result in degrees.
Used In:
ArmA/OFP
Example:
_angle = atan 1 ..........Result is 45

--------------------------------------------------------------------------------
x atan2 y
Operand types:
x: Number
y: Number
Type of returned value:
Number
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:
ArmA/OFP
Example:
_angle = 5 atan2 3 ..........Result is 59.0362

--------------------------------------------------------------------------------
atg x
Operand types:
x: Number
Type of returned value:
Number
Description:
Arctangens of x, result in degrees.
Used In:
ArmA/OFP
Example:
_angle = atg 1 ..........Result is 45

--------------------------------------------------------------------------------
attackEnabled group
Operand types:
group: Object or Group
Type of returned value:
Boolean
Description:
Return whether leader can issue attack commands.
Used In:
ArmA
--------------------------------------------------------------------------------
« To Menu
B
Index
behaviour
benchmark
boundingBox
breakOut
breakTo
buildingPos
buttonAction
buttonAction
buttonSetAction
buttonSetAction
behaviour unit
Operand types:
unit: Object
Type of returned value:
String
Description:
Behaviour mode of given unit.
Possible options are:
"CARELESS"
"SAFE"
"AWARE"
"COMBAT"
"STEALTH"
Used In:
ArmA/OFP
Example:
_mood = behaviour player

--------------------------------------------------------------------------------
benchmark
Operand types:
None
Type of returned value:
Number
Description:
Value of "3D performance" in OFP preferences.
This can be used to estimate computer performance.
This function can be used to create missions that are able to adapt to computer peformance.
Used In:
ArmA/OFP
Example:
? benchmark > 2000 : setviewdistance 2000
--------------------------------------------------------------------------------
boundingBox object
Operand types:
object: Object
Type of returned value:
Array
Description:
Returns a bounding box of given object in model coordinates space.
The result is in the format [[minX, minZ, minY], [maxX, maxZ, maxY]].
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
breakOut name
Operand types:
Name: String
Type of returned value:
Nothing
Description:
Breaks block out of scope named 'name'.
Nil is returned.
Used In:
ArmA
--------------------------------------------------------------------------------
breakTo name
Operand types:
Name: String
Type of returned value:
Nothing
Description:
Breaks block to scope named 'name'.
Nil is returned.
Used In:
ArmA
--------------------------------------------------------------------------------
building buildingPos index
Operand types:
building: Object
index: Number
Type of returned value:
Array
Description:
Returns given indexed position in building, returned value is in format Position.
Used In:
ArmA/OFP
Examples:
buildingPos [building2, 1]
unit setPos ((object 21222) buildingPos 1)
ScouseJedi
More examples:
this move (building buildingPos 1)
this move (bunker1 buildingPos 1)
Will move a unit to the 1st position specified in a buildings model, in the second example - bunker1.
General Barron
In the default game buildings, the buildingPos is usually right behind a window.
This can make it easy to place units in the windows of buildings, by putting the unit near a building and putting this in its init field:
this setpos getpos (buildingPos [nearestbuilding this, 1])
« To Menu
--------------------------------------------------------------------------------
buttonAction idc
Operand types:
idc: Number
Type of returned value:
String
Description:
Return action assigned to control with id idc of topmost user dialog.
Action is any expression in this scripting language.
Can be used for buttons and active texts.
Used In:
ArmA/OFP
Example:
_action = buttonAction 100
--------------------------------------------------------------------------------
buttonAction control
Operand types:
control: Control
Type of returned value:
String
Description:
Returns the action assigned to the given button or active text.
The action is any expression in this scripting language.
Used In:
ArmA
Example:
_action = buttonAction _button
« To Menu
--------------------------------------------------------------------------------
buttonSetAction [idc, action]
Operand types:
[idc, action]: Array
Type of returned value:
Nothing
Description:
Assign action to control with id idc of topmost user dialog.
Action is any expression in this scripting language.
Can be used for buttons and active texts.
Used In:
ArmA/OFP
Example:
buttonSetAction [100, "player exec ""reply.sqs"""]
--------------------------------------------------------------------------------
control buttonSetAction action
Operand types:
control: Control
action: String
Type of returned value:
Nothing
Description:
Assign an action to the given button or active text.
Action is any expression in this scripting language.
Can be used for buttons and active texts.
Used In:
ArmA/OFP
Example:
_control buttonSetAction "player exec ""reply.sqs"""
--------------------------------------------------------------------------------
« To Menu
D-F
D
Index
damage
date
daytime
debugLog
default
deg
deleteCenter
deleteCollection
deleteGroup
deleteIdentity
deleteMarker
deleteMarkerLocal
deleteStatus
deleteTarget
deleteVehicle
deleteWaypoint
dialog
difficultyEnabled
direction
disableAI
disableUserInput
displayCtrl
displayNull
displaySetEventHandler
dissolveTeam
distance
distributionRegion
do
do
do
doFire
doFollow
doFSM
doGetOut
doMove
doStop
doTarget
doWatch
doWatch
drawArrow
drawEllipse
drawIcon
drawLine
drawRectangle
driver
drop
damage object
Operand types:
object: Object
Type of returned value:
Number
Description:
Object damage in range 0 to 1.
Note: This function is identical to getDammage.
Used In:
ArmA/OFP
Example:
? ((damage player) > 0.3) : hint "Ouch!!"
--------------------------------------------------------------------------------
date
Operand types:
None
Type of returned value:
Array
Description:
Return the actual mission date and time as an array [year, month, day, hour, minute].
Used In:
ArmA
--------------------------------------------------------------------------------
daytime
Operand types:
None
Type of returned value:
Number
Description:
Time in the world, in hours.
Used In:
ArmA/OFP
Example:
_timeofday = daytime
--------------------------------------------------------------------------------
debugLog anything
Operand types:
anything: Any Value
Type of returned value:
Nothing
Description:
Dump argument type and value to debugging output.
Used In:
ArmA/OFP
Example:
debugLog player
--------------------------------------------------------------------------------
default a
Operand types:
a: Code
Type of returned value:
Nothing
Description:
see switch
Used In:
ArmA
--------------------------------------------------------------------------------
deg x
Operand types:
x: Number
Type of returned value:
Number
Description:
Convert x from radians to degrees.
Used In:
ArmA/OFP
Example:
_degrees = deg 1 ..........Result is 57.295
« To Menu
--------------------------------------------------------------------------------
deleteCenter side
Operand types:
side: Side
Type of returned value:
Nothing
Description:
Destroys the AI center of the given side.
Used In:
ArmA
Example:
deleteCenter East
--------------------------------------------------------------------------------
deleteCollection object
Operand types:
object: Object
Type of returned value:
Nothing
Description:
Delete a collection.
Used In:
ArmA
--------------------------------------------------------------------------------
deleteGroup group
Operand types:
group: Group
Type of returned value:
Nothing
Description:
Destroys the given AI group.
Used In:
ArmA
Example:
deleteGroup group
« To Menu
--------------------------------------------------------------------------------
deleteIdentity identityName
Operand types:
identityName: String
Type of returned value:
Boolean
Description:
Delete identity created by saveIdentity from campaign progress file.
Used In:
ArmA/OFP
Example:
deleteIdentity "playerIdentity"
--------------------------------------------------------------------------------
deleteMarker name
Operand types:
name: String
Type of returned value:
Nothing
Description:
Destroys the given global marker.
Used In:
ArmA
Example:
deleteMarker "Marker1"
--------------------------------------------------------------------------------
deleteMarkerLocal name
Operand types:
name: String
Type of returned value:
Nothing
Description:
Destroys the given local marker.
Used In:
ArmA
Example:
deleteMarkerLocal "Marker5"
--------------------------------------------------------------------------------
deleteStatus statusName
Operand types:
statusName: String
Type of returned value:
Boolean
Description:
Delete status created by saveStatus from campaign progress file.
Used In:
ArmA/OFP
Example:
deleteStatus "playerState"
« To Menu
--------------------------------------------------------------------------------
deleteTarget target
Operand types:
target: Target
Type of returned value:
Nothing
Description:
Delete a target.
Not yet implemented.
Used In:
ArmA
Example:
deleteTarget target
--------------------------------------------------------------------------------
deleteVehicle object
Operand types:
object: Object
Type of returned value:
Nothing
Description:
Delete any unit or vehicle.
Only vehicles inserted in editor or created during mission can be deleted.
Player unit cannot be deleted.
Used In:
ArmA/OFP
Example:
deleteVehicle tank1
Tactician
Since this function will not delete a player unit, a useful multiplayer application is the removal of AI created by players leaving the game.
If you run deleteVehicle for every playable soldier, the AI units will be removed.
« To Menu
--------------------------------------------------------------------------------
deleteWaypoint waypoint
Operand types:
waypoint: Array
Type of returned value:
Nothing
Description:
Removes the waypoint.
Used In:
ArmA
Example:
deleteWaypoint [grp, 2]
--------------------------------------------------------------------------------
dialog
Operand types:
None
Type of returned value:
Boolean
Description:
Check if user dialog is present.
Used In:
ArmA/OFP
Example:
? ! dialog : goto "play"
--------------------------------------------------------------------------------
difficultyEnabled flag
Operand types:
flag: String
Type of returned value:
Boolean
Description:
Checks the specific difficulty settings of the current user.
Difficulty flag names can be found in the ArmA profile file under class Difficulties/Regular/Flags or the class Difficulties/Veteran/Flags.
Used In:
ArmA
Example:
hint str (difficultyEnabled "UnlimitedSaves")
--------------------------------------------------------------------------------
direction object
Operand types:
object: Object
Type of returned value:
Number
Description:
Object heading in range 0 to 360.
Used In:
ArmA/OFP
Example:
_d = direction player
« To Menu
--------------------------------------------------------------------------------
unit disableAI section
Operand types:
unit: Object
section: String
Type of returned value:
Nothing
Description:
Disable parts of AI behaviour to get fine control over unit.
Section is one of:
"TARGET" (disable watching assigned target)
"AUTOTARGET" (disable independed target assigning and watching unknown targets),
"MOVE" (disable movement)
Used In:
ArmA/OFP
Example:
soldierOne disableAI "Move"
General Barron
The "TARGET" section of the AI is likely different than what you would think.
Normally, when an AI group is standing still and sees an enemy, the group will break formation and start moving towards the enemy.
If you disable the "TARGET" AI, then the AI units will stay where they are at.
Even if you disable the "MOVE" AI, the units will still move out to attack the enemy, unless you disable the "TARGET" AI.
Disabling both these AI sections is useful when placing units in defensive positions.
This way, you can have them stay behind their cover, and not run out into the open.
« To Menu
--------------------------------------------------------------------------------
disableUserInput disable
Operand types:
disable: Boolean
Type of returned value:
Nothing
Description:
Disable user input.
This is normally used in cutscenes to disable players controls.
Used In:
ArmA/OFP
Example:
disableUserInput true
--------------------------------------------------------------------------------
display displayCtrl idc
Operand types:
display: Display
idc: Number
Type of returned value:
Control
Description:
Return child control with specified idc.
Used In:
ArmA
Example:
_control = _display displayCtrl 101
--------------------------------------------------------------------------------
displayNull
Operand types:
None
Type of returned value:
Display
Description:
A non-existing display.
This value is not equal to anything, including itself.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
display displaySetEventHandler [handler name, function]
Operand types:
display: Display
[handler name, function]: Array
Type of returned value:
Nothing
Description:
Sets given event handler of given display.
Used In:
ArmA
Example:
_control displaySetEventHandler ["KeyDown", ""]
--------------------------------------------------------------------------------
dissolveTeam team
Operand types:
team: String
Type of returned value:
Nothing
Description:
Dissolves the given team.
All members become members of the main team.
Possible team values are:
"RED"
"GREEN"
"BLUE"
"YELLOW"
Used In:
ArmA
Example:
dissolveTeam "RED"
--------------------------------------------------------------------------------
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 distance between two objects or positions.
Used In:
ArmA/OFP
Example:
_dist = player distance leader player
« To Menu
--------------------------------------------------------------------------------
distributionRegion
Operand types:
None
Type of returned value:
Number
Description:
Returns the numerical index for the distribution region of the examined copy of ArmA.
1 - The United States
2 - The Rest of the World
Used In:
ArmA
Example:
distributionRegion == 2
--------------------------------------------------------------------------------
while do code
Operand types:
while: While Type
code: Code
Type of returned value:
Nothing
Description:
Repeat code while condition is true.
Note: Maximum repeat count for loop is 10000.
If condition is still true after loop was repeated 10000 times, loop is terminated and error message is shown.
Used In:
ArmA/OFP
Example:
while "a>b" do {a=a+1}
--------------------------------------------------------------------------------
forCommand do code
Operand types:
forCommand: For Type
code: Code
Type of returned value:
Anything
Description:
End of for command, starts cycle.
Used In:
ArmA
Example:
for "_x" from 20 to 10 step -2 do {..code..}
--------------------------------------------------------------------------------
switch do block
Operand types:
forCommand: Switch Type
block: Code
Type of returned value:
Anything
Description:
Switch form.
Used In:
ArmA
Example:
switch (_a) do { case 1: {block}; case 2 : {block}; default {block};}
« To Menu
--------------------------------------------------------------------------------
unit doFire target
Operand types:
unit: Object or Array
target: Object
Type of returned value:
Nothing
Description:
Order unit to commence fire on given target (silently).
If target is objNull, commence fire to current target (set using doTarget or commandTarget).
Used In:
ArmA/OFP
Example:
soldierOne doFire objNull
macguba
It is often helpful to use doTarget first.
--------------------------------------------------------------------------------
unit doFollow position
Operand types:
unit: Object or Array
position: Object
Type of returned value:
Nothing
Description:
Order unit to follow given unit (silently).
Used In:
ArmA/OFP
Example:
soldierOne doFollow player
« To Menu
--------------------------------------------------------------------------------
unit(s) doFSM [fsm name, position, target]
Operand types:
unit(s): Object or Array
[fsm name, position, target]: Array
Type of returned value:
Nothing
Description:
Orders a unit to process command defined by FSM file (silently).
Used In:
ArmA
Example:
soldierOne doFSM ["move.fsm", position player, player]
--------------------------------------------------------------------------------
doGetOut unit
Operand types:
unit: Object or Array
Type of returned value:
Nothing
Description:
Orders a unit to get out from the vehicle (silently).
Used In:
ArmA
Example:
doGetOut unitOne
--------------------------------------------------------------------------------
unit doMove position
Operand types:
unit: Object or Array
position: Array
Type of returned value:
Nothing
Description:
Order unit to move to given position (format Position) (silently).
Used In:
ArmA/OFP
Example:
soldierOne doMove getMarkerPos "MarkerMoveOne"
« To Menu
--------------------------------------------------------------------------------
doStop unit
Operand types:
unit: Object or Array
Type of returned value:
Nothing
Description:
Order unit to stop (silently).
Note: Stop command is never finished, unit will never be ready.
Used In:
ArmA/OFP
Example:
doStop unitOne
General Barron
This command will make the unit stop where he is until the unit's group engages the enemy.
At that time, the unit will move and fight the enemy.
One good use for this is to place a bunch of guys in the same group around a campfire or in some other place "for looks", and make them sit down or have their weapon on their back.
When the enemy is spotted, they will get up and attack.
Note: that you cannot do something like place somebody behind sandbags and keep him there during a fight with this command.
For that you will need disableAI "move".
--------------------------------------------------------------------------------
unit doTarget position
Operand types:
unit: Object or Array
position: Object
Type of returned value:
Nothing
Description:
Order unit to move, to target, given target (silently).
Used In:
ArmA/OFP
Example:
soldierOne doTarget player
« To Menu
--------------------------------------------------------------------------------
unit doWatch position
Operand types:
unit: Object or Array
position: Array
Type of returned value:
Nothing
Description:
Order unit to watch given position (format Position) (silently).
Used In:
ArmA/OFP
Example:
soldierOne doWatch getMarkerPos "MarkerMoveOne"
--------------------------------------------------------------------------------
doWatch target
Operand types:
unit: Object or Array
position: Object
Type of returned value:
Nothing
Description:
Order unit to move, to watch given target (silenty).
Used In:
ArmA/OFP
Example:
soldierOne doWatch player
--------------------------------------------------------------------------------
map drawArrow [position1, position2, color]
Operand types:
map: Control
[position1, position2, color]: Array
Type of returned value:
Nothing
Description:
Draw arrow in map.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
map drawEllipse [center, a, b, angle, color, fill]
Operand types:
map: Control
[center, a, b, angle, color, fill]: Array
Type of returned value:
Nothing
Description:
Draw ellipse in map.
Used In:
ArmA
--------------------------------------------------------------------------------
map drawIcon [texture, color, position, width, height, angle, text, shadow]
Operand types:
map: Control
[texture, color, position, width, height, angle, text, shadow]: Array
Type of returned value:
Nothing
Description:
Draw icon in map.
Used In:
ArmA
--------------------------------------------------------------------------------
map drawLine [position1, position2, color]
Operand types:
map: Control
[position1, position2, color]: Array
Type of returned value:
Nothing
Description:
Draw line in map.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
map drawRectangle [center, a, b, angle, color, fill]
Operand types:
map: Control
[center, a, b, angle, color, fill]: Array
Type of returned value:
Nothing
Description:
Draw rectangle in map.
Used In:
ArmA
--------------------------------------------------------------------------------
driver vehicle
Operand types:
vehicle: Object
Type of returned value:
Object
Description:
Driver of the vehicle, if vehicle is not vehicle but person, person is returned.
Used In:
ArmA/OFP
Example:
? (driver (vehicle player) != player : goto "reassign"
« To Menu
--------------------------------------------------------------------------------
drop array
Operand types:
array: Array
Type of returned value:
Nothing
Description:
Drops a particle into the scene.
Array is in format ParticleArray.
Used In:
ArmA/OFP
Tactician
Particle systems created by drop are client-side effects, that means they are affected by multiplayer locality.
If a mission is designed for play on a dedicated server, you should consider excluding drop commands from the host for efficiency.
jostapo
Through thoughtful use of MP 'spoofing', drop works just as well as camCreate.
This means you have the 'real' bullets and bombs generated on the server, while having the clients duplicate the script at the same time, only this time using harmless versions of the lethal stuff created on the server.
--------------------------------------------------------------------------------
« To Menu
E
Index
east
echo
effectiveCommander
else
emptyPositions
enableAI
enableAttack
enableEndDialog
enableEnvironment
enableRadio
enableReload
enableTeamSwitch
enemy
engineOn
estimatedTimeLeft
exec
execVM
execVM
exit
exitWith
exp
expectedDestination
exportLandscapeXYZ

east
Operand types:
None
Type of returned value:
Side
Description:
East side.
Used In:
ArmA/OFP
Example:
?((side soldierOne) == east) : hint "Unit is an eastern soldier"
--------------------------------------------------------------------------------
echo text
Operand types:
text: String
Type of returned value:
Nothing
Description:
Sends any text into the debugger console or the logfile.
Present in internal version only, not working in the retail version.
Used In:
ArmA
Example:
echo "Text in logfile"
--------------------------------------------------------------------------------
effectiveCommander vehicle
Operand types:
vehicle: Object
Type of returned value:
Object
Description:
Returns the effective commander (who really commands) of the vehicle.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
ifCode else elseCode
Operand types:
ifCode: String
elseCode: String
Type of returned value:
Array
Description:
Construct array that can be processed by then.
Used In:
ArmA/OFP
Example:
if (a>b) then {c=0} else {c=1}
--------------------------------------------------------------------------------
vehicle emptyPositions position
Operand types:
vehicle: Object
position: String
Type of returned value:
Number
Description:
Returns the number of available cargo, driver, gunner or commander positions in the vehicle.
Used In:
ArmA
Example:
_freePositions = (vehicle player) emptyPositions "cargo"
--------------------------------------------------------------------------------
unit enableAI section
Operand types:
unit: Object
section: String
Type of returned value:
Nothing
Description:
Enables parts of the AI behaviour.
Section is one of:
"TARGET" (enables watching assigned targets)
"AUTOTARGET" (enables independed target assigning and watching of unknown targets)
"MOVE" (enables movement)
Used In:
ArmA
Example:
soldierOne enableAI "Move"
« To Menu
--------------------------------------------------------------------------------
group enableAttack enable
Operand types:
group: Object or Group
enable: Boolean
Type of returned value:
Nothing
Description:
Set if leader can issue attack commands.
Used In:
ArmA
--------------------------------------------------------------------------------
enableEndDialog
Operand types:
None
Type of returned value:
Nothing
Description:
Enable dialog buttons to be shown during onPlayerKilled.sqs script.
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
enableEnvironment enabled
Operand types:
enabled: Boolean
Type of returned value:
Nothing
Description:
Enable/disable environmental effects (ambient life + sound).
Used In:
ArmA
Example:
enableEnvironment false
« To Menu
--------------------------------------------------------------------------------
enableRadio enable
Operand types:
enable: Boolean
Type of returned value:
Nothing
Description:
Enable radio transmissions to be heard and seen on screen.
Used In:
ArmA/OFP
Example:
enableRadio true
--------------------------------------------------------------------------------
object enableReload enable
Operand types:
object: Object
enable: Boolean
Type of returned value:
Nothing
Description:
Enable / disable reload right after magazine is empty.
Used In:
ArmA
Example:
_vehicle enableReload true
--------------------------------------------------------------------------------
enableTeamSwitch enable
Operand types:
enable: Boolean
Type of returned value:
Nothing
Description:
Enable / disable team switch.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
enemy
Operand types:
None
Type of returned value:
Side
Description:
Enemy side (enemy to all units).
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
vehicle engineOn enable
Operand types:
vehicle: Object
enable: Boolean
Type of returned value:
Nothing
Description:
Switch engine off / on for given vehicle.
Used In:
ArmA/OFP
Example:
carOne engineOn true
--------------------------------------------------------------------------------
estimatedTimeLeft timeLeft
Operand types:
timeLeft: Number
Type of returned value:
Nothing
Description:
Estimated time left in the game.
Using this function, designer can provide timeleft estimate that is shown in "Game in progress" screen or in master browser.
For missions with hard set limit adjusted via Param1, following example can be used in init.sqs.
Used In:
ArmA/OFP
Example:
estimatedTimeLeft Param1
« To Menu
--------------------------------------------------------------------------------
argument exec script
Operand types:
argument: Any Value
script: String
Type of returned value:
Nothing
Description:
Execute script.
Argument is passed to script as local variable _this.
Script is first searched for in mission folder, then in campaign scripts subfolder, lastly in global scripts folder.
Used In:
ArmA/OFP
Example:
[player, jeepOne] exec "getIn.sqs"
--------------------------------------------------------------------------------
argument execVM filename
Operand types:
argument: Any Value
filename: String
Type of returned value:
Script
Description:
Compile and execute function (sqf).
Argument is passed to the script as local variable _this.
The function is first searched for in the mission folder, then in the campaign scripts folder and finally in the global scripts folder.
Used In:
ArmA
Example:
player execVM "test.sqf"
« To Menu
--------------------------------------------------------------------------------
execVM filename
Operand types:
filename: String
Type of returned value:
Script
Description:
Compile and execute function (sqf).
The function is first searched for in the mission folder, then in the campaign scripts folder and finally in the global scripts folder.
Used In:
ArmA
Example:
execVM "test.sqf"
--------------------------------------------------------------------------------
exit
Operand types:
None
Type of returned value:
Nothing
Description:
Exit script.
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
ifCommand exitWith code
Operand types:
ifCommand: If Type
code: Code
Type of returned value:
Anything
Description:
If result of condition is true, evaluates code, and current block with result of code.
Used In:
ArmA
Example:
if (_x>5) exitWith {echo "_x is too big";_x}......result is when _x is greater then 5, outputs message and terminates code in current level with value of _x
« To Menu
--------------------------------------------------------------------------------
exp x
Operand types:
x: Number
Type of returned value:
Number
Description:
Exponential value of x.
Used In:
ArmA/OFP
Example:
_value = exp 1 ..........Result is 2.7182
--------------------------------------------------------------------------------
expectedDestination person
Operand types:
person: Object
Type of returned value:
Array
Description:
Return expected destination of unit as an array with format: [position, planningMode, forceReplan].
Used In:
ArmA
--------------------------------------------------------------------------------
exportLandscapeXYZ filename
Operand types:
filename: String
Type of returned value:
Nothing
Description:
Exports landscape as XYZ file.
Not available in the retail version.
Used In:
ArmA
--------------------------------------------------------------------------------
« To Menu
F
F
Index
fadeMusic
fadeRadio
fadeSound
false
fillWeaponsFromPool
find
findCover
findDisplay
findNearestEnemy
finishMissionInit
finite
fire
fire
flag
flagOwner
fleeing
floor
flyInHeight
fog
fogForecast
for
for
forceEnd
forceMap
forceSpeed
forEach
format
formation
formationDirection
formationLeader
formationMembers
formationPosition
formationTask
formatText
formLeader
friendly
from
fuel
time fadeMusic volume
Operand types:
time: Number
volume: Number
Type of returned value:
Nothing
Description:
Smooth change in music volume.
Change duration is given by time (in seconds), target volume by volume.
Volume range is 0 (no music) to 1 (full volume).
Default music volume is 0.5.
Used In:
ArmA/OFP
Example:
5 fadeMusic 0

--------------------------------------------------------------------------------
time fadeRadio volume
Operand types:
time: Number
volume: Number
Type of returned value:
Nothing
Description:
Causes a smooth change in the radio volume.
The change duration is given by time (in seconds), target volume by volume.
Volume range is 0 (no volume) to 1 (full volume).
Default radio volume is 1.0.
Used In:
ArmA
Example:
5 fadeRadio 0.1

--------------------------------------------------------------------------------
time fadeSound volume
Operand types:
time: Number
volume: Number
Type of returned value:
Nothing
Description:
Smooth change in all sounds volume.
Change duration is given by time, target volume by volume.
Default sounds volume is 1.0.
Used In:
ArmA/OFP
Example:
5 fadeSound 0.1
--------------------------------------------------------------------------------
false
Operand types:
None
Type of returned value:
Boolean
Description:
Always false.
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
fillWeaponsFromPool person
Operand types:
person: Object
Type of returned value:
Nothing
Description:
Add magazines from campaign pool to person (depending on weapons person has).
Used In:
ArmA/OFP
Example:
fillWeaponsFromPool victor
« To Menu
--------------------------------------------------------------------------------
array find x
Operand types:
array: Array
x:Any Value
Type of returned value:
Number
Description:
Returns the position of the first array element that matches x, returns -1 if not found.
Used In:
ArmA
Example:
[7, 3, 9] find 1......result is 1
--------------------------------------------------------------------------------
object findCover [position, hidePosition, maxDist, minDist, visibilityPosition, ignoreObject]
Operand types:
object: Object
[position, hidePosition, maxDist, minDist, visibilityPosition, ignoreObject]:Array
Type of returned value:
Object
Description:
Returns the object where the object should search for cover.
The minDist, visibilityPosition and ignoreObject parameters are optional.
visibilityPosition is used to select cover that can see a certain position.
ignoreObject is an object that is ignored in visibility check.
Used In:
ArmA
--------------------------------------------------------------------------------
findDisplay idd
Operand types:
idd: Number
Type of returned value:
Display
Description:
Find display by its IDD.
Used In:
ArmA
Example:
_display = findDisplay 1
« To Menu
--------------------------------------------------------------------------------
findNearestEnemy position
Operand types:
object: Object
position:Object or Array
Type of returned value:
Object
Description:
Find the nearest enemy from the specified position.
Used In:
ArmA
--------------------------------------------------------------------------------
finishMissionInit
Operand types:
None
Type of returned value:
Nothing
Description:
Finish world initialization before mission is launched.
Used In:
ArmA
--------------------------------------------------------------------------------
finite x
Operand types:
x: Number
Type of returned value:
Boolean
Description:
True, if number is finite (not infinite and valid number).
Used In:
ArmA
Example:
finite 10/0......result is false
« To Menu
--------------------------------------------------------------------------------
unit fire weaponName
Operand types:
unit: Object
weaponName: String
Type of returned value:
Nothing
Description:
Unit will fire from given weapon.
Used In:
ArmA/OFP
Example:
soldierOne fire "HandGrenade"
General Barron
Often it is difficult to get a unit to fire at another unit exactly when you want (in a cutscene, for example).
It usually works better to use this command.
First, have the unit point at his target with the doWatch command .
Then have him fire with this command.
If he is close enough, and not at a funny angle, he will often hit his target.
--------------------------------------------------------------------------------
unit fire array
Operand types:
unit: Object
array: Array
Type of returned value:
Nothing
Description:
Unit will fire from given weapon.
Argument has format [muzzle, mode, magazine] or [muzzle, mode].
Used In:
ArmA/OFP
Example:
soldierOne fire ["throw","SmokeShell","SmokeShell"]
« To Menu
--------------------------------------------------------------------------------
flag unit
Operand types:
unit: Object
Type of returned value:
Object
Description:
If unit has a flag, flag is returned.
If not, ObjNull is returned.
Used In:
ArmA/OFP
Example:
_flutter = flag player
--------------------------------------------------------------------------------
flagOwner flag
Operand types:
flag: Object
Type of returned value:
Object
Description:
When used on flag, returned value is person that has the flag.
When used on anything else, ObjNull is returned.
Used In:
ArmA/OFP
Example:
_flagholder = flagOwner flagOne
--------------------------------------------------------------------------------
fleeing unit
Operand types:
unit: Object
Type of returned value:
Boolean
Description:
Check if unit is fleeing.
Dead or empty unit returns false.
Used In:
ArmA/OFP
Example:
? (fleeing eastReconGroup) : goto "firingsquad"
« To Menu
--------------------------------------------------------------------------------
floor x
Operand types:
x: Number
Type of returned value:
Number
Description:
The floor value of x.
Used In:
ArmA
Example:
floor 5.25......result is 5
--------------------------------------------------------------------------------
helicopter flyInHeight height
Operand types:
helicopter: Object
height: Number
Type of returned value:
Nothing
Description:
Set flying height level for helicopter.
Accepted range is 50 to 1000.
Used In:
ArmA/OFP
Example:
cobraOne flyInHeight 150
Tactician
From version 1.80+ - flyInHeight now affects not only helicopters, but also planes.
--------------------------------------------------------------------------------
fog
Operand types:
None
Type of returned value:
Number
Description:
Return the current fog.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
fogForecast
Operand types:
None
Type of returned value:
Number
Description:
Return the fog forecast.
Used In:
ArmA
--------------------------------------------------------------------------------
for forspec
Operand types:
forspec: Array
Type of returned value:
For Type
Description:
Creates cycle, using C like style.
Used In:
ArmA
Example:
for [{_x=1},{_x<=10},{_x=_x+1}] do {debugLog _x;}
--------------------------------------------------------------------------------
for var
Operand types:
var: String
Type of returned value:
For Type
Description:
Starts a for sequence, use in complete form(see Example).
Used In:
ArmA
Example:
for "_x" from 1 to 10 do {debugLog _x;}
« To Menu
--------------------------------------------------------------------------------
forceEnd
Operand types:
None
Type of returned value:
Nothing
Description:
Force mission termination.
Used In:
ArmA/OFP
Example:
? _deadfriends > 6 : forceend
--------------------------------------------------------------------------------
forceMap show
Operand types:
show: Boolean
Type of returned value:
Nothing
Description:
Force map display.
Used In:
ArmA/OFP
Example:
forceMap true
--------------------------------------------------------------------------------
object forceSpeed speed
Operand types:
helicopter: Object
height: Number
Type of returned value:
Nothing
Description:
Force the speed of the given object.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
command forEach array
Operand types:
command: String
array: Array
Type of returned value:
Nothing
Description:
Execute given command for each element of array.
It is executed as follows:
For each element of array assign element as _x and execute command.
Used In:
ArmA/OFP
Example:
"_x setdammage 1" forEach units group player
--------------------------------------------------------------------------------
format format
Operand types:
format: Array
Type of returned value:
String
Description:
First argument of array is the format string.
Format string may contain references to following arguments in form %1, %2, etc.
Each %x is replaced by corresponding argument.
%x may appear in the format string in any order.
Used In:
ArmA/OFP
Examples:
format ["%1 - %2 - %1", 1,"text"] ..........Result is "1 - text - 1"
hint format ["%1", loon1 distance Tank1]
titletext [format ["Good morning, Captain %1.", name player], "plain", 1]

--------------------------------------------------------------------------------
formation grp
Operand types:
grp: Object or Group
Type of returned value:
String
Description:
Formation of the group.
Can be one of:
"COLUMN"
"STAG COLUMN"
"WEDGE"
"ECH LEFT"
"ECH RIGHT"
"VEE"
"LINE"
Used In:
ArmA/OFP
Example:
_state = formation group player
« To Menu
--------------------------------------------------------------------------------
formationDirection person
Operand types:
person: Object
Type of returned value:
Number
Description:
Return the direction the unit is watching in formation.
Used In:
ArmA
--------------------------------------------------------------------------------
formationLeader person
Operand types:
person: Object
Type of returned value:
Object
Description:
Return leader of the formation.
Used In:
ArmA
--------------------------------------------------------------------------------
formationMembers person
Operand types:
person: Object
Type of returned value:
Array
Description:
Return list of units (drivers) in the formation.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
formationPosition person
Operand types:
person: Object
Type of returned value:
Array
Description:
Return the position of unit in the formation.
Used In:
ArmA
--------------------------------------------------------------------------------
formationTask person
Operand types:
person: Object
Type of returned value:
String
Description:
Return the current task of the unit in the formation.
Used In:
ArmA
--------------------------------------------------------------------------------
formatText [format, arg1, arg2, ...]
Operand types:
[format, arg1, arg2, ...]: Array
Type of returned value:
Structured Text
Description:
Creates a structured text by replacing %1, %2, etc. in format by plain or structured texts given as arguments.
Used In:
ArmA
Example:
txt = formatText ["Image: %1", image "data\isniper.paa"]
--------------------------------------------------------------------------------
formLeader unit
Operand types:
unit: Object
Type of returned value:
Object
Description:
Formation leader for given unit, for dead units ObjNull.
This is often the same as group leader, but not always.
Used In:
ArmA/OFP
Example:
? (formLeader player != leader player) : hint "Formation leader is not the group leader."
« To Menu
--------------------------------------------------------------------------------
friendly
Operand types:
None
Type of returned value:
Side
Description:
Friendly side (friendly to all units).
Used In:
ArmA/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.
Used In:
ArmA
Example:
for "_x" from 10 to 20 do {..code..}
--------------------------------------------------------------------------------
fuel vehicle
Operand types:
vehicle: Object
Type of returned value:
Number
Description:
Check how much fuel vehicle has left in the gas tank, in range 0 to 1.
Used In:
ArmA/OFP
Example:
? (fuel (vehicle player) <0.1) : hint "Fuel is running low"
--------------------------------------------------------------------------------
« To Menu
G
G
Index
getArray
getDammage
getDir
getHideFrom
getMarkerColor
getMarkerPos
getMarkerSize
getMarkerType
getNumber
getPos
getPosASL
getSpeed
getText
getVariable
getWPPos
glanceAt
globalChat
globalRadio
goto
group
groupChat
groupRadio
grpNull
gunner
getArray config
Operand types:
config:Config
Type of returned value:
Array
Description:
Extract array from config entry.
Used In:
ArmA
Example:
_array = getArray (configFile >> "CfgVehicles" >> "Thing" >> "threat")
--------------------------------------------------------------------------------
getDammage obj
Operand types:
obj: Object
Type of returned value:
Number
Description:
Object damage in range 0 to 1.
Used In:
ArmA/OFP
Examples:
getDammage player
getDammage object 1234

--------------------------------------------------------------------------------
getDir obj
Operand types:
obj: Object
Type of returned value:
Number
Description:
Object heading in range 0 to 360.
Used In:
ArmA/OFP
Example:
getDir player
--------------------------------------------------------------------------------
object getHideFrom enemy
Operand types:
object:Object
enemy:Object
Type of returned value:
Array
Description:
Returns the hiding position in format Position.
If enemy is null it is some position in front of the object or enemy position otherwise.
Used In:
ArmA
--------------------------------------------------------------------------------
getMarkerColor marker
Operand types:
marker:String
Type of returned value:
String
Description:
Get marker colour.
See setMarkerColor.
Used In:
ArmA/OFP
Example:
_mColour = getMarkerColor "MarkerOne"
« To Menu
--------------------------------------------------------------------------------
getMarkerPos markerName
Operand types:
markerName:String
Type of returned value:
Array
Description:
Marker positon [x, y, z].
Used In:
ArmA/OFP
Example:
_mPos = getMarkerPos "MarkerOne"
--------------------------------------------------------------------------------
getMarkerSize marker
Operand types:
marker:String
Type of returned value:
Array
Description:
Get marker size.
See setMarkerSize.
Used In:
ArmA/OFP
Example:
_mSize = getMarkerSize "MarkerOne"
--------------------------------------------------------------------------------
getMarkerType marker
Operand types:
marker:String
Type of returned value:
String
Description:
Get type of marker.
See setMarkerType.
Used In:
ArmA/OFP
Example:
_mType = getMarkerType "MarkerOne"
--------------------------------------------------------------------------------
getNumber config
Operand types:
config:Config
Type of returned value:
Number
Description:
Extract number from config entry.
Used In:
ArmA
Example:
_array = getNumber (configFile >> "CfgVehicles" >> "Thing" >> "maxSpeed")
« To Menu
--------------------------------------------------------------------------------
getPos obj
Operand types:
obj: Object
Type of returned value:
Array
Description:
Object position in format Position.
Used In:
ArmA/OFP
Example:
_pPos = getPos player
Mandoble
In Arma, the following gets a units correct height (above ground) if that unit is on a buildings roof or on one of its floors:
realheight = [getPos _unit select 0,getPos _unit select 1, (getPos _unit select 2) + (_unit distance (getPos _unit))]
 
--------------------------------------------------------------------------------
getPosASL obj
Operand types:
obj:Object
Type of returned value:
Array
Description:
Returns the object position in format PositionASL.
Used In:
ArmA
Example:
getPosASL player
--------------------------------------------------------------------------------
object getSpeed speedMode
Operand types:
object:Object
speedMode:String
Type of returned value:
Number
Description:
Get the speed for the given speed mode.
SpeedMode can be:
"AUTO"
"SLOW"
"NORMAL"
"FAST"
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
getText config
Operand types:
config:Config
Type of returned value:
String
Description:
Extract text from config entry.
Used In:
ArmA
Example:
_array = getText (configFile >> "CfgVehicles" >> "Thing" >> "icon")
--------------------------------------------------------------------------------
object getVariable name
Operand types:
object:Object
name:String
Type of returned value:
Any Value
Description:
Return the value of variable in the variable space of given object.
Used In:
ArmA
Example:
vehiclename getVariable "variablename"
--------------------------------------------------------------------------------
getWPPos waypoint
Operand types:
waypoint: Array
Type of returned value:
Array
Description:
Get waypoint position.
Waypoint format is Waypoint.
Used In:
ArmA/OFP
Example:
_wPos = getWPPos [groupOne, 1]
« To Menu
--------------------------------------------------------------------------------
unit(s) glanceAt position
Operand types:
unit(s):Object or Array
position:Object or Array
Type of returned value:
Any Value
Description:
Control what the unit is glancing at (target or position) (format Position.
Used In:
ArmA
Example:
someSoldier glanceAt otherSoldier
otherSoldier glanceAt getMarkerPos "markerOne"
--------------------------------------------------------------------------------
unit globalChat chatText
Operand types:
unit: Object
chatText: String
Type of returned value:
Nothing
Description:
Type text to global 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 them.
Used In:
ArmA/OFP
Example:
soldierOne globalChat "Show this text"
--------------------------------------------------------------------------------
unit globalRadio radioName
Operand types:
unit: Object
radioName: String
Type of returned value:
Nothing
Description:
Send message to global radio channel.
Message is defined in description.ext.
Used In:
ArmA/OFP
Example:
soldierOne globalRadio "messageOne"
« To Menu
--------------------------------------------------------------------------------
goto label
Operand types:
label: String
Type of returned value:
Nothing
Description:
In script only: Go to given label.
Note: String argument is used here.
Be sure to use double quotes around label name in goto.
Used In:
ArmA/OFP
Example:
goto "Loop"
macguba
Define the label with #.
Note that loops should always have a time delay.
Triggers poll every 0.5 seconds so you rarely need a loop faster than that.
Example:
#loop
~3
? not (alive loon1): goto "oops"
goto "loop"
#oops
hint "Loon1 is dead"
exit
--------------------------------------------------------------------------------
group obj
Operand types:
obj: Object
Type of returned value:
Group
Description:
Group in which given unit is assigned.
For dead units: grpNull.
Used In:
ArmA/OFP
Example:
group player = group leader player
« To Menu
--------------------------------------------------------------------------------
unit groupChat chatText
Operand types:
unit: Object
chatText: String
Type of returned value:
Nothing
Description:
Type text to group 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 them.
Used In:
ArmA/OFP
Example:
soldierOne groupChat "Show this text"
--------------------------------------------------------------------------------
unit groupRadio radioName
Operand types:
unit: Object
radioName: String
Type of returned value:
Nothing
Description:
Send message to group radio channel.
Message is defined in description.ext.
Used In:
ArmA/OFP
Example:
soldierOne groupRadio "messageOne"
« To Menu
--------------------------------------------------------------------------------
grpNull
Operand types:
None
Type of returned value:
Group
Description:
Non-existant group.
This values is not equal to anything, not even to itself.
Used In:
ArmA/OFP
Example:
group player == grpNull ..........Result is false
--------------------------------------------------------------------------------
gunner vehicle
Operand types:
vehicle: Object
Type of returned value:
Object
Description:
Gunner of the vehicle, if vehicle is not a vehicle, but person, person is returned.
Used In:
ArmA/OFP
Example:
? (gunner (vehicle player) != player : goto "reassign"
--------------------------------------------------------------------------------
« To Menu
H-K
H
Index
halt
handsHit
hasWeapon
hideBehindScripted
hideBody
hierarchyObjectsCount
hint
hintC
hintC
hintC
hintC
hintCadet
htmlLoad
halt
Operand types:
None
Type of returned value:
Nothing
Description:
Stops the program into a debugger.
Used In:
ArmA
Example:
halt
--------------------------------------------------------------------------------
handsHit soldier
Operand types:
soldier: Object
Type of returned value:
Number
Description:
Check if soldiers hand are hit (inaccurate aiming).
Used In:
ArmA/OFP
Example:
? (handsHit player) : hint "Ouch!!"
--------------------------------------------------------------------------------
unit hasWeapon weaponName
Operand types:
unit: Object
weaponName: String
Type of returned value:
Boolean
Description:
Check if unit has given weapon.
Used In:
ArmA/OFP
Example:
? (player hasWeapon "M16") : goto "ready"
--------------------------------------------------------------------------------
object hideBehindScripted scriptedHideBehind
Operand types:
object:Object
scriptedHideBehind: Boolean
Type of returned value:
Nothing
Description:
When set to true it disables the default engine hiding behavior.
Used In:
ArmA
Example:
unit hideBehindScripted true
« To Menu
--------------------------------------------------------------------------------
object hideBody person
Operand types:
person:Object
Type of returned value:
Nothing
Description:
Hides the body of the given person.
Used In:
ArmA
Example:
hideBody player
--------------------------------------------------------------------------------
hierarchyObjectsCount
Operand types:
None
Type of returned value:
Number
Description:
The number of objects in hierarchy.
Used In:
ArmA
--------------------------------------------------------------------------------
hint text
Operand types:
text: String
Type of returned value:
Nothing
Description:
Show hint text.
Text can contain several lines.
A \n is used to indicate a new line.
Used In:
ArmA/OFP
Examples:
hint "Press W to move forward"
hint "Press W to move forward. \nPress S to move backwards. \nUse the mouse to turn right or left."

--------------------------------------------------------------------------------
hintC text
Operand types:
text: String
Type of returned value:
Nothing
Description:
Show hint text.
Text can contain several lines.
A \n is used to indicate a new line.
Hint must be confirmed.
Used In:
ArmA/OFP
Example:
hintC "Press V for weapon sights"
--------------------------------------------------------------------------------
title hintC [text1, text2, ...]
Operand types:
title: String
[text1, text2, ...]: Array
Type of returned value:
Nothing
Description:
Creates a hint dialog with the given title and text.
Texts can be plain or structured.
Used In:
ArmA
--------------------------------------------------------------------------------
title hintC text
Operand types:
title: String
text: String
Type of returned value:
Nothing
Description:
Creates a hint dialog with the given title and text.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
title hintC text
Operand types:
title: String
text: Structured Text
Type of returned value:
Nothing
Description:
Creates a hint dialog with the given title and text.
Used In:
ArmA
--------------------------------------------------------------------------------
hintCadet text
Operand types:
text: String
Type of returned value:
Nothing
Description:
Show hint text only in cadet mode.
Text can contain several lines.
A \n is used to indicate a new line.
Used In:
ArmA/OFP
Example:
hintCadet "Press G to display compass"
--------------------------------------------------------------------------------
control htmlLoad filename
Operand types:
control: Control
filename: String
Type of returned value:
Nothing
Description:
Load HTML from file to given control.
Used In:
ArmA
Example:
_control htmlLoad "briefing.html"
--------------------------------------------------------------------------------
I
Index
if
image
in
in
inflame
inflamed
inGameUISetEventHandler
inheritsFrom
initAmbientLife
intersect
isArray
isClass
isEngineOn
isFormationLeader
isHidden
isHideBehindScripted
isKeyActive
isKindOf
isKindOf
isMarkedForCollection
isnil
isNull
isNull
isNull
isNull
isNumber
isPlayer
isServer
isText
if condition
Operand types:
condition: Boolean
Type of returned value:
If Type
Description:
First part of if command.
Used In:
ArmA/OFP
Example:
if (a>b) then {a=b}
Roni
Standard syntax = if a then b
Alternative syntax = ? a : b

--------------------------------------------------------------------------------
image filename
Operand types:
filename: String
Type of returned value:
Structured Text
Description:
Creates a structured text containing the given image.
Used In:
ArmA
Example:
txt1 = image "data\isniper.paa"
--------------------------------------------------------------------------------
x in array
Operand types:
x: Any Value
array: Array
Type of returned value:
Boolean
Description:
Check if x is equal to any element of array.
Used In:
ArmA/OFP
Example:
_it = 1 in [0, 1, 2] ..........Result is true
--------------------------------------------------------------------------------
soldier in vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Boolean
Description:
Check if soldier is mounted in the vehicle.
Used In:
ArmA/OFP
Example:
? player in jeepOne : jeepOne setfuel 1
« To Menu
--------------------------------------------------------------------------------
fireplace inflame burn
Operand types:
fireplace: Object
burn: Boolean
Type of returned value:
Nothing
Description:
Control fireplace burning.
Set inflame to true (on) or false (off).
Used In:
ArmA/OFP
Example:
fireplaceOne inflame true
--------------------------------------------------------------------------------
inflamed fireplace
Operand types:
fireplace: Object
Type of returned value:
Boolean
Description:
Check if fireplace is inflamed (burning) or not.
Used In:
ArmA/OFP
Example:
_it = inflamed fireplaceOne
--------------------------------------------------------------------------------
inGameUISetEventHandler [handler name, function]
Operand types:
[handler name, function]: Array
Type of returned value:
Nothing
Description:
Sets given event handler of in-game UI.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
inheritsFrom config
Operand types:
config: Config
Type of returned value:
Config
Description:
Returns base entry of config entry.
Used In:
ArmA
Example:
_base = inheritsFrom (configFile >> "CfgVehicles" >> "Car")
--------------------------------------------------------------------------------
initAmbientLife
Operand types:
None
Type of returned value:
Nothing
Description:
Initialize the ambient life.
Used In:
ArmA
--------------------------------------------------------------------------------
[object, lod name] intersect [begin, end]
Operand types:
[object, lod name]:Array
[begin, end]:Array
Type of returned value:
Array
Description:
Find named selection in object which is in specified lod intersected by given section of a line.
Used In:
ArmA
Example:
[tank, "VIEW"] intersect [[1500, 1500, 2], [1550, 1500, 2]]
« To Menu
--------------------------------------------------------------------------------
isArray config
Operand types:
config:Config
Type of returned value:
Boolean
Description:
Check if config entry represents array.
Used In:
ArmA
Example:
_ok = isArray (configFile >> "CfgVehicles")......result is false
--------------------------------------------------------------------------------
isClass config
Operand types:
config:Config
Type of returned value:
Boolean
Description:
Check if config entry represents config class.
Used In:
ArmA
Example:
_ok = isClass (configFile >> "CfgVehicles")......result is true
--------------------------------------------------------------------------------
isEngineOn vehicle
Operand types:
vehicle: Object
Type of returned value:
Boolean
Description:
Returns true if engine is on, false if it is off.
Used In:
ArmA/OFP
Example:
_it = isEngineOn carOne
« To Menu
--------------------------------------------------------------------------------
isFormationLeader person
Operand types:
person: Object
Type of returned value:
Boolean
Description:
Returns true if the specified person is subgroup leader.
Used In:
ArmA
--------------------------------------------------------------------------------
isHidden person
Operand types:
person: Object
Type of returned value:
Boolean
Description:
Return whether the person is hidden (reached the hiding position).
Used In:
ArmA
--------------------------------------------------------------------------------
isHideBehindScripted vehicle
Operand types:
vehicle: Object
Type of returned value:
Boolean
Description:
Return whether the vehicle has set the hideBehindScripted true.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
isKeyActive keyName
Operand types:
keyName: String
Type of returned value:
Boolean
Description:
Checks whether the given key is active in the current user profile.
Used In:
ArmA
Example:
ok = isKeyActive "M04"
--------------------------------------------------------------------------------
object isKindOf typeName
Operand types:
object: Object
typeName: String
Type of returned value:
Boolean
Description:
Checks whether the object is of the given type.
Used In:
ArmA
Example:
vehicle player isKindOf "Tank"
--------------------------------------------------------------------------------
typeName1 isKindOf typeName2
Operand types:
typeName1: String
typeName2: String
Type of returned value:
Boolean
Description:
Checks whether the object is of the given type.
Used In:
ArmA
Example:
"AV8B" isKindOf "Plane"
--------------------------------------------------------------------------------
isMarkedForCollection object
Operand types:
object: Object
Type of returned value:
Boolean
Description:
Checks whether the object is marked for weapons collection.
Used In:
ArmA
Example:
marked = isMarkedForCollection truck
« To Menu
--------------------------------------------------------------------------------
isnil variable
Operand types:
variable: String or Code
Type of returned value:
Boolean
Description:
Tests whether the variable is null.
The function returns true if the variable is null and false if it's not.
Used In:
ArmA
Example:
if (isnil (("_pokus")) then {_pokus=0;}
--------------------------------------------------------------------------------
isNull grp
Operand types:
grp: Group
Type of returned value:
Boolean
Description:
Check if value is equal to grpNull.
Note: a == grpNull does not work, because grpNull is not equal to anything, not even to itself.
Used In:
ArmA/OFP
Example:
_it = isNull group player .......Result is false

--------------------------------------------------------------------------------
isNull obj
Operand types:
obj: Object
Type of returned value:
Boolean
Description:
Check if value is equal to objNull.
Note: a == objNull does not work, because objNull is not equal to anything, not even to itself.
Used In:
ArmA/OFP
Example:
_it = isNull objNull.......Result is false
--------------------------------------------------------------------------------
isNull display
Operand types:
display:Display
Type of returned value:
Boolean
Description:
Checks whether the value is equal to displayNull.
Note: a==displayNull does not work, because displayNull is not equal to anything, not even to itself.
Used In:
ArmA
Example:
isNull displayNull .......Result is true
« To Menu
--------------------------------------------------------------------------------
isNull control
Operand types:
control:Control
Type of returned value:
Boolean
Description:
Checks whether the value is equal to controlNull.
Note: a==controlNull does not work, because controlNull is not equal to anything, not even to itself.
Used In:
ArmA
Example:
isNull controlNull .......Result is true
--------------------------------------------------------------------------------
isNumber config
Operand types:
config:Config
Type of returned value:
Boolean
Description:
Check if config entry represents number.
Used In:
ArmA
Example:
_ok = isNumber (configFile >> "CfgVehicles") .......Result is false
--------------------------------------------------------------------------------
isPlayer person
Operand types:
person:Object
Type of returned value:
Boolean
Description:
Check if given person is the player.
Used In:
ArmA
--------------------------------------------------------------------------------
isServer
Operand types:
None
Type of returned value:
Boolean
Description:
Checks if the machine is running as a server in a Multiplayer game.
Used In:
ArmA
Example:
if !(isServer) exitWith {}
--------------------------------------------------------------------------------
isText config
Operand types:
config:Config
Type of returned value:
Boolean
Description:
Check if config entry represents text.
Used In:
ArmA
Example:
_ok = isText (configFile >> "CfgVehicles") .......Result is false
--------------------------------------------------------------------------------
« To Menu
J
Index
join
joinSilent
unitArray join group
Operand types:
unitArray: Array
group: Object or Group
Type of returned value:
Nothing
Description:
Join all units in the array to given group.
Note: Total number of group members must not exceed 12.
Note: This function is unsupported in MP in version 1.33 and before.
Used In:
ArmA/OFP
Example:
[unitOne, unitTwo] join player
--------------------------------------------------------------------------------
unitArray joinSilent group
Operand types:
unitArray: Array
group: Object or Group
Type of returned value:
Nothing
Description:
Join all units in the array to given group, silently (without a radio meaasage).
Note for OFP: Total number of group members must not exceed 12.
Note: This function is unsupported in MP in version 1.33 and before.
Used In:
ArmA
Example:
[unitOne, unitTwo] joinSilent player
--------------------------------------------------------------------------------

K
Index
kbAddDatabase
kbAddDatabaseTargets
kbAddTopic
kbHasTopic
kbRemoveTopic
kbTell
keyImage
keyName
knowsAbout

person kbAddDatabase filename
Operand types:
person:Object
filename: String
Type of returned value:
Boolean
Description:
Register knowledge base database to given person.
Used In:
ArmA
Example:
_unit kbAddDatabase "chat.txt"
--------------------------------------------------------------------------------
person kbAddDatabaseTargets filename
Operand types:
person:Object
filename: String
Type of returned value:
Boolean
Description:
Register target list knowledge base database to given person.
Used In:
ArmA
Example:
_unit kbAddDatabaseTargets "chat.txt"
--------------------------------------------------------------------------------
person kbAddTopic [name, filename(, task type)]
Operand types:
person:Object
[name, filename(, task type)]: Array
Type of returned value:
Nothing
Description:
Register conversation topic to given person.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
person kbHasTopic name
Operand types:
person:Object
name: String
Type of returned value:
Boolean
Description:
Check if conversation topic was registered to given person.
Used In:
ArmA
--------------------------------------------------------------------------------
person kbRemoveTopic name
Operand types:
person:Object
name: String
Type of returned value:
Nothing
Description:
Unregister conversation topic from given person.
Used In:
ArmA
--------------------------------------------------------------------------------
person kbTell [argument name, argument value, argument text, argument speech], ...]
Operand types:
person:Object
[argument name, argument value, argument text, argument speech], ...]: Array
Type of returned value:
Nothing
Description:
Make the person tell to the receiver the sentence.
Used In:
ArmA
--------------------------------------------------------------------------------
keyImage dikCode
Operand types:
dikCode:Number
Type of returned value:
Structured Text
Description:
Returns a structured text, containing an image or name (if no image is found) of the button (on the keyboard, mouse or joystick) with the given code.
Used In:
ArmA
Example:
name = keyImage 28......result is "Enter"
« To Menu
--------------------------------------------------------------------------------
keyName dikCode
Operand types:
dikCode:Number
Type of returned value:
String
Description:
Returns a structured text, containing an image or name (if no image is found) of the button (on the keyboard, mouse or joystick) with the given code.
Used In:
ArmA
Example:
name = keyName 28......result is "Enter"
--------------------------------------------------------------------------------
unit knowsAbout target
Operand types:
unit:Object or Group
target:Object
Type of returned value:
Number
Description:
Check if (and by how much) unit knows about target.
If unit is vehicle, vehicle commander is considered.
Used In:
ArmA/OFP
Example:
_kv = soldierOne knowsAbout jeepOne
toadlife
Some background info on this command for all you AI scripting nuts out there:
With Resistance (1.91):
No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.105.
With CWC (1.46):
No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsAbout' number is 0.7.
What this means is, the AI will not fire on an enemy soldier until his 'knowsAbout' level of that enemy has reached the 'magic number' or higher.
This suggests that the knowsabout level must reach the magic threshold before a unit knows if another unit is an enemy or friendly unit.
Triggers and knowsabout level:
"Detected by xxx" triggers also follow the above rules.
For a detected trigger to be set off, the knowsAbout level must reach the magic number.
Also...
As soon as An AI unit gets hit with a bullet his knowsAbout level for the unit that shot him will instantly jump to 1.5, even if the shooter is 1000m away.
Vice versa is also true.
If An AI soldier's knowsAbout level for an enemy is 0.7 and the soldier fires and hits the enemy, his knowsAbout level about the enemy will instantly jump to 1.5.
This seems like some sort of AI tweak BIS implemented.
General Barron
I have experimented with this command a little, and the truth is I'm fairly disapointed in it.
Basically, this is what I've found:
A target must be in front of the unit for him to be noticed.
So if you sprint right behind an enemy, this value doesn't increase.
It takes a couple of seconds for a unit to notice a target, even if he is in plain sight and right in front of him.
So if you run right past a unit, this value might not increase.
Bushes between the unit and the target seem to have little effect on this value, and trees definately have no affect.
You may be in a forest, and can't see the unit, but he can see you.
Once the target goes out of sight of the unit, his knowsAbout value doesn't instantly go back down.
Rather, it slowly decreases, taking maybe a couple minutes to go from 4 to 0.
So if a unit spots you, and you then teleport yourself to the other side of the island, his knowsAbout value on you could still be 3 or higher.
I don't have all the answers on this, and I haven't really done extensive research on this command.
But to me, this command seems to fall short of what I wish it could be.
Please post comments on your findings with this command, and if anything I said was wrong.
« To Menu
toadlife
Quote:
A target must be in front of the unit for him to be noticed.
So if you sprint right behind an enemy, this value doesn't increase.
Yes, AI enemies do have a very limited amount of peripheral vision, that's not nearly as good as a human player's is.
I've always compensated for this by using a sentry script that makes the unit look from side to side.
This greatly increases their chance of spotting enemies.
I've used the sentry script for guards that stand watch.
Quote:
It takes a couple seconds for a unit to notice a target, even if he is in plain sight and right in front of him.
So if you run right past a unit, this value might not increase.
The time it takes for an enemy to notice you will depend on the units skill level, but I've never been able to run right past an enemy and not have him notice me.
Quote:
Bushes between the unit and the target seem to have little affect on this value, and trees definitely have no affect.
You may be in a forest, and can't see the unit, but he can see you.
Very true and very annoying.
Quote:
Once the target goes out of sight of the unit, his knowsabout value doesn't instantly go back down. Rather, it slowly decreases, taking maybe a couple minutes to go from 4 to 0.
So if a unit spots you, and you then teleport yourself to the other side of the island, his knowsabout value on you could still be 3 or higher.
This is a good thing, and in my opinion it's realistic.
Teleporting with setpos is not something that could happen in real life, so the knowsAbout command shouldn't take this scenario into account.
The reason it slowly decreases is because it makes the soldiers act more human like.
If you see a soldier run over a hill, your are going to still have an idea where he is after he disappears, but your knowledge of where that soldier is will become less reliable, the more time he is out of your sight.
It's not a perfect system, but it's not too bad either.
Unnamed
When it comes to what the player knows about the enemy AI, individual trees and bushes do affect line of sight.
An AI that moves behind an individual tree or bush, does eventually return a knowsAbout value of 0.
The generic forest object does not affect the knowsAbout value in the same way as individual trees and bushes.
An AI that moves from the open into a forest will return a knowsAbout value less than if it remains in the open.
Although it will never return a value of 0, even if you can't directly see the AI.
--------------------------------------------------------------------------------
L
L
Index
land
landAt
lbAdd
lbAdd
lbClear
lbClear
lbColor
lbColor
lbCurSel
lbCurSel
lbData
lbData
lbDelete
lbDelete
lbIsSelected
lbPicture
lbPicture
lbSelection
lbSetColor
lbSetColor
lbSetCurSel
lbSetCurSel
lbSetData
lbSetData
lbSetPicture
lbSetPicture
lbSetSelected
lbSetValue
lbSetValue
lbSize
lbSize
lbSort
lbSortByValue
lbText
lbText
lbValue
lbValue
leader
leader
leaveVehicle
leaveVehicle
lightAttachObject
lightDetachObject
lightIsOn
limitSpeed
lineBreak
list
ln
loadFile
loadIdentity
loadStatus
local
localize
lock
locked
lockWP
log
lookAt
helicopter land mode
Operand types:
helicopter: Object
mode: String
Type of returned value:
Nothing
Description:
Force helicopter landing.
Landing mode may be:
"LAND" (complete stop)
"GET IN" (hovering very low, for another unit to get in)
"GET OUT" (hovering low,for another unit to get out)
Used In:
ArmA/OFP
Example:
cobraOne land "LAND"
General Barron
Helos will land at the nearest "H" or "Invisible H", if there is one around.
But landing helos with this command is fairly unreliable.
Use this script here to get better results.
Helos also tend to fly off before everyone is onboard.
Again, try this script here .
--------------------------------------------------------------------------------
object landAt id
Operand types:
object: Object
id: Number
Type of returned value:
Nothing
Description:
Order an AI plane to land at the airfield with the specified id number.
Following id numbers apply:
0 - Paraiso
1 - Rahmadi
2 - Pita
3 - Antigua
Used In:
ArmA
Example:
beagle7 landAt 3
--------------------------------------------------------------------------------
lbAdd [idc, text]
Operand types:
[idc, text]: Array
Type of returned value:
Number
Description:
Add item with the given text to listbox or combobox with id idc of topmost user dialog.
It returns the index of newly added item.
Used In:
ArmA/OFP
Example:
_index = lbAdd [101, "First item"]
--------------------------------------------------------------------------------
control lbAdd text
Operand types:
control: Control
text: String
Type of returned value:
Number
Description:
Adds an item with the given text to the given listbox or combobox.
It returns the index of the newly added item.
Used In:
ArmA
Example:
_index = _control lbAdd "First item"
--------------------------------------------------------------------------------
lbClear idc
Operand types:
idc: Number
Type of returned value:
Nothing
Description:
Clear all items in listbox or combobox with id idc of topmost user dialog.
Used In:
ArmA/OFP
Example:
lbClear 101
--------------------------------------------------------------------------------
lbClear control
Operand types:
control: Control
Type of returned value:
Nothing
Description:
Clears all items in the given listbox or combobox.
Used In:
ArmA
Example:
lbClear _control
« To Menu
--------------------------------------------------------------------------------
lbColor [idc, index]
Operand types:
[idc, index]: Array
Type of returned value:
Array
Description:
Return text colour of item with given index of listbox or combobox with id idc of topmost user dialog.
Colour is in format Color.
Used In:
ArmA/OFP
Example:
_colour = lbColor [101, 0]
--------------------------------------------------------------------------------
control lbColor index
Operand types:
control: Control
index: Number
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.
Colour is in format Color.
Used In:
ArmA
Example:
_color = _control lbAdd 0
--------------------------------------------------------------------------------
lbCurSel idc
Operand types:
idc: Number
Type of returned value:
Number
Description:
Return index of selected item of listbox or combobox with id idc of topmost user dialog.
Used In:
ArmA/OFP
Example:
_index = lbCurSel 101
« To Menu
--------------------------------------------------------------------------------
lbCurSel control
Operand types:
control: Control
Type of returned value:
Number
Description:
Returns the index of the selected item of the given listbox or combobox.
Used In:
ArmA
Example:
_index = lbCurSel _control
--------------------------------------------------------------------------------
lbData [idc, index]
Operand types:
[idc, index]: Array
Type of returned value:
String
Description:
Return additional text (invisible) in item with given index of listbox or combobox with id idc of topmost user dialog.
Used In:
ArmA/OFP
Example:
_data = lbData [101, 0]
--------------------------------------------------------------------------------
control lbData index
Operand types:
control: Control
index: Number
Type of returned value:
String
Description:
Returns the additional text (invisible) in an item with the given index of the given listbox or combobox.
Used In:
ArmA
Example:
_data = _control lbData 0
« To Menu
--------------------------------------------------------------------------------
lbDelete [idc, index]
Operand types:
[idc, index]: Array
Type of returned value:
Nothing
Description:
Remove item with given index from listbox or combobox with id idcof topmost user dialog.
Used In:
ArmA/OFP
Example:
lbDelete [101, 0]
--------------------------------------------------------------------------------
control lbDelete index
Operand types:
control: Control
index: Number
Type of returned value:
Nothing
Description:
Removes the item with the given index from the given listbox or combobox.
Used In:
ArmA
Example:
_control lbDelete 0
--------------------------------------------------------------------------------
control lbIsSelected index
Operand types:
control: Control
index: Number
Type of returned value:
Boolean
Description:
Check whether given row of the given listbox is selected.
Used In:
ArmA
Example:
_selected = _control lbIsSelected 0
« To Menu
--------------------------------------------------------------------------------
lbPicture [idc, index]
Operand types:
[idc, index]: Array
Type of returned value:
String
Description:
Return picture name in item with given index of listbox or combobox with id idc of topmost user dialog.
Used In:
ArmA/OFP
Example:
_picture = lbPicture [101, 0]
--------------------------------------------------------------------------------
control lbPicture index
Operand types:
control: Control
index: Number
Type of returned value:
String
Description:
Returns the picture name of the item with the given index of the given listbox or combobox.
Used In:
ArmA
Example:
_picture = _control lbPicture 0
--------------------------------------------------------------------------------
lbSelection control
Operand types:
control: Control
Type of returned value:
Array
Description:
Returns the array of selected rows indices in the given listbox.
Used In:
ArmA
Example:
_indices = lbPicture _control
« To Menu
--------------------------------------------------------------------------------
lbSetColor [idc, index, color]
Operand types:
[idc, index, color]: Array
Type of returned value:
Nothing
Description:
Set colour of item with given index of listbox or combobox with id idc of topmost user dialog to color.
Colour is in format Color.
Used In:
ArmA/OFP
Example:
lbSetColor [101, 0, [0, 1, 0, 0.5]]
--------------------------------------------------------------------------------
control lbSetColor [index, color]
Operand types:
control: Control
[index, color]: Array
Type of returned value:
Nothing
Description:
Sets the text color of the item with the given index of the given listbox or combobox.
Colour is in format Color.
Used In:
ArmA
Example:
_control lbSetColor [0, [0, 1, 0, 0.5]]
--------------------------------------------------------------------------------
lbSetCurSel [idc, index]
Operand types:
[idc, index]: Array
Type of returned value:
Nothing
Description:
Select item with given index of listbox or combobox with id idc of topmost user dialog.
Used In:
ArmA/OFP
Example:
lbSetCurSel [101, 0]
« To Menu
--------------------------------------------------------------------------------
control lbSetCurSel index
Operand types:
control: Control
index: Number
Type of returned value:
Nothing
Description:
Selects the item with the given index of the given listbox or combobox.
Used In:
ArmA
Example:
_control lbSetCurSel 0
--------------------------------------------------------------------------------
lbSetData [idc, index, data]
Operand types:
[idc, index, data]: Array
Type of returned value:
Nothing
Description:
Set additional text (invisible) in item with given index of listbox or combobox with id idc of topmost user dialog to data.
Used In:
ArmA/OFP
Example:
lbSetData [101, 1, "#1"]
--------------------------------------------------------------------------------
control lbSetData [index, data]
Operand types:
control: Control
[index, data]: Array
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.
Used In:
ArmA
Example:
_control lbSetData [1, "#1"]
« To Menu
--------------------------------------------------------------------------------
lbSetPicture [idc, index, name]
Operand types:
[idc, index, name]: Array
Type of returned value:
Nothing
Description:
Set picture in item with given index of listbox or combobox with id idc of topmost user dialog.
Picture name is name, picture is searched for in mission directory, subdirectory dtaExt of campaign directory, directory dtaExt and bank (or directory) data.
Used In:
ArmA/OFP
Example:
lbSetPicture [101, 0, "iskoda"]
--------------------------------------------------------------------------------
control lbSetPicture [index, name]
Operand types:
control: Control
[index, name]: Array
Type of returned value:
Nothing
Description:
Sets the picture in the item with the given index of the given listbox or combobox.
Name is the picture name.
The picture is searched for in the mission directory, the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory).
Used In:
ArmA
Example:
_control lbSetPicture [0, "iskoda"]
--------------------------------------------------------------------------------
control lbSetSelected [index, selected]
Operand types:
control: Control
[index, selected]: Array
Type of returned value:
Nothing
Description:
Set the selection state of the given row of the given listbox.
Listbox must support multiple selection.
Used In:
ArmA
Example:
_control lbSetSelected [0, true]
« To Menu
--------------------------------------------------------------------------------
lbSetValue [idc, index, value]
Operand types:
[idc, index, value]: Array
Type of returned value:
Nothing
Description:
Set additional integer value in item with given index of listbox or combobox with id idc of topmost user dialog to value.
Used In:
ArmA/OFP
Example:
lbSetValue [101, 0, 1]
--------------------------------------------------------------------------------
control lbSetValue [index, value]
Operand types:
control: Control
[index, value]: Array
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.
Used In:
ArmA
Example:
_control lbSetValue [0, 1]
--------------------------------------------------------------------------------
lbSize idc
Operand types:
idc: Number
Type of returned value:
Number
Description:
Return number of items of listbox or combobox with id idc of topmost user dialog.
Used In:
ArmA/OFP
Example:
_n = lbSize 101
« To Menu
--------------------------------------------------------------------------------
lbSize control
Operand types:
control: Control
Type of returned value:
Number
Description:
Returns the number of items in the given listbox or combobox.
Used In:
ArmA
Example:
_n = lbSize _control
--------------------------------------------------------------------------------
lbSort control
Operand types:
control: Control
Type of returned value:
Nothing
Description:
Sorts listbox entries alphabetically.
Used In:
ArmA
Example:
lbSort _control2
--------------------------------------------------------------------------------
lbSortByValue control
Operand types:
control: Control
Type of returned value:
Nothing
Description:
Sorts listbox entries numerically.
Used In:
ArmA
Example:
lbSortByValue _control5
--------------------------------------------------------------------------------
lbText [idc, index]
Operand types:
[idc, index]: Array
Type of returned value:
String
Description:
Return shown text in item with givenindex of listbox or combobox with id idc of topmost user dialog.
Used In:
ArmA/OFP
Example:
_text = lbText [101, 0]
--------------------------------------------------------------------------------
control lbText index
Operand types:
control: Control
index: Number
Type of returned value:
String
Description:
Returns the shown text in the item with the given index of the given listbox or combobox.
Used In:
ArmA
Example:
_text = _control lbText 0
« To Menu
--------------------------------------------------------------------------------
lbValue [idc, index]
Operand types:
[idc, index]: Array
Type of returned value:
Number
Description:
Return additional integer value in item with given index of listbox or combobox with id idc of topmost user dialog.
Used In:
ArmA/OFP
Example:
_value = lbValue [101, 0]
--------------------------------------------------------------------------------
control lbValue index
Operand types:
control: Control
index: Number
Type of returned value:
Number
Description:
Returns the additional integer value in the item with the given index of the given listbox or combobox.
Used In:
ArmA
Example:
_value = _control lbValue 0
--------------------------------------------------------------------------------
leader unit
Operand types:
unit:
Type of returned value:
Object
Description:
Group leader for given unit, for dead units ObjNull.
Used In:
ArmA/OFP
Example:
_leader = leader player
« To Menu
--------------------------------------------------------------------------------
leader grp
Operand types:
grp: Group
Type of returned value:
Object
Description:
Group leader for given group.
For dead unit GrpNull is returned.
Used In:
ArmA/OFP
Example:
_leader = leader group player
--------------------------------------------------------------------------------
unit leaveVehicle vehicle
Operand types:
unit: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Unit cease using vehicle, unassign unit from the vehicle.
Used In:
ArmA/OFP
Example:
soldierOne leaveVehicle jeepOne
--------------------------------------------------------------------------------
group leaveVehicle vehicle
Operand types:
group: Group
vehicle: Object
Type of returned value:
Nothing
Description:
Group cease using vehicle, unassign all group units from the vehicle.
Used In:
ArmA/OFP
Example:
groupOne leaveVehicle jeepOne
« To Menu
--------------------------------------------------------------------------------
light lightAttachObject [object, position]
Operand types:
light: Object
[object, position]: Array
Type of returned value:
Nothing
Description:
Attach light to given object (at given position).
Used In:
ArmA
--------------------------------------------------------------------------------
lightDetachObject light
Operand types:
light: Object
Type of returned value:
Nothing
Description:
Detach light from object.
Used In:
ArmA
--------------------------------------------------------------------------------
lightIsOn lamppost
Operand types:
lamppost: Object
Type of returned value:
String
Description:
Check if lampost is on (shining).
Possible values are:
"ON"
"OFF"
"AUTO" (auto is only on during the night).
Used In:
ArmA/OFP
Examples:
lightIsOn nearestObject [player, "StreetLamp"] != "OFF"
_it = lightIsOn object 159582
macguba
Use switchLight to turn lamposts on and off.
« To Menu
--------------------------------------------------------------------------------
object limitSpeed speed
Operand types:
object: Object
speed: Number
Type of returned value:
Nothing
Description:
Limit speed of given vehicle to given value (in km/h).
Used In:
ArmA
--------------------------------------------------------------------------------
lineBreak
Operand types:
None
Type of returned value:
Structured Text
Description:
Creates a structured text containing a line break.
Used In:
ArmA
Example:
txt3 = lineBreak
--------------------------------------------------------------------------------
list trigger
Operand types:
trigger: Object
Type of returned value:
Array
Description:
List of units that would activate given trigger.
For trigger of type "Not present" the list is the same as that returned for "present".
Used In:
ArmA/OFP
Example:
_tlist = list triggerOne
« To Menu
--------------------------------------------------------------------------------
ln x
Operand types:
x: Number
Type of returned value:
Number
Description:
Natural logarithm of x.
Used In:
ArmA/OFP
Example:
_nlog = ln 10 ..........Result is 2.302
--------------------------------------------------------------------------------
loadFile filename
Operand types:
filename: String
Type of returned value:
String
Description:
Return content of given file.
Used In:
ArmA/OFP
Example:
loadFile "myFunction.sqf"
--------------------------------------------------------------------------------
person loadIdentity name
Operand types:
person: Object
name: String
Type of returned value:
Boolean
Description:
Loads person's identity from objects.sav file in campaign directory (from entry name).
Used In:
ArmA/OFP
Example:
player loadIdentity "playerIdentity"
« To Menu
--------------------------------------------------------------------------------
object loadStatus name
Operand types:
object: Object
name: String
Type of returned value:
Boolean
Description:
Loads object's properties from objects.sav file in campaign directory (from entry name).
Used In:
ArmA/OFP
Example:
player loadStatus "playerState"
--------------------------------------------------------------------------------
local obj
Operand types:
obj: Object
Type of returned value:
Boolean
Description:
MP: Check if given unit is local on the computer.
This can be used when some activation fields or scripts need to be performed only on one computer.
In SP all objects are local.
Note: All static objects are local everywhere.
Used In:
ArmA/OFP
Example:
local unitName
Tactician
In multiplayer, a game logic will always be local to the host computer.
This works on both dedicated and player-hosted servers.
« To Menu
--------------------------------------------------------------------------------
localize stringName
Operand types:
stringName: String
Type of returned value:
String
Description:
Replace string with given name with corresponding localized text from stringtable.csv..
Used In:
ArmA/OFP
Example:
localize "STR_DN_FROG"
--------------------------------------------------------------------------------
vehicle lock lock
Operand types:
vehicle: Object
lock: Boolean
Type of returned value:
Nothing
Description:
Lock vehicle (disable mounting / dismounting) for player.
Used In:
ArmA/OFP
Example:
jeepOne lock true
--------------------------------------------------------------------------------
locked unit
Operand types:
unit: Object
Type of returned value:
Boolean
Description:
Check if vehicle is locked for player.
If it is locked, player cannot mount / dismount without order.
Used In:
ArmA/OFP
Example:
_it = locked jeepOne
« To Menu
--------------------------------------------------------------------------------
group lockWP lockWP
Operand types:
group: Object or Group
lockWP: Boolean
Type of returned value:
Nothing
Description:
Disable switching to next waypoint (current waypoint will never complete while lockwp is used).
Sometimes used during cut-scenes.
Used In:
ArmA/OFP
Example:
groupOne lockWP true
--------------------------------------------------------------------------------
log x
Operand types:
x: Number
Type of returned value:
Number
Description:
Base-10 logarithm of x.
Used In:
ArmA/OFP
Example:
_log = log 10 ..........Result is 1
--------------------------------------------------------------------------------
unit(s) lookAt position
Operand types:
unit(s): Object or Array
position: Object or Array
Type of returned value:
Nothing
Description:
Control what the unit is looking at (target or position).
Format of position is Position
Used In:
ArmA
Examples:
someSoldier lookAt otherSoldier;
otherSoldier lookAt getMarkerPos "markerOne"
--------------------------------------------------------------------------------
« To Menu
M
M
Index
magazines
mapAnimAdd
mapAnimClear
mapAnimCommit
mapAnimDone
markerColor
markerDir
markerPos
markerSize
markerText
markerType
max
min
missionConfigFile
missionName
missionStart
mod
modelToWorld
move
moveInCargo
moveInCargo
moveInCommander
moveInDriver
moveInGunner
moveInTurret
moveTarget
moveTo
moveToCompleted
moveToFailed
musicVolume
magazines vehicle
Operand types:
vehicle: Object
Type of returned value:
Array
Description:
Returns array of types names of all vehicle's magazines.
Used In:
ArmA/OFP
Example:
_mags = magazines player
--------------------------------------------------------------------------------
mapAnimAdd frame
Operand types:
frame: Array
Type of returned value:
Nothing
Description:
Add next frame to map animation.
Format of frame is [time, zoom, position], format of position is Position2D.
Used In:
ArmA/OFP
Example:
mapAnimAdd [1, 0.1, getMarkerPos "anim1"]
--------------------------------------------------------------------------------
mapAnimClear
Operand types:
None
Type of returned value:
Nothing
Description:
Clear map animation.
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
mapAnimCommit
Operand types:
None
Type of returned value:
Nothing
Description:
Play map animation.
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
mapAnimDone
Operand types:
None
Type of returned value:
Boolean
Description:
Check if map animation is finished.
Used In:
ArmA/OFP
« To Menu
--------------------------------------------------------------------------------
markerColor markerName
Operand types:
markerName: String
Type of returned value:
String
Description:
Get marker colour.
See setMarkerColor.
Note: This function is identical to getMarkerColor.
Used In:
ArmA/OFP
Example:
? markerColor "MarkerOne" == "ColorRed" : player setFace "Marilyn"
--------------------------------------------------------------------------------
markerDir markerName
Operand types:
markerName: String
Type of returned value:
Number
Description:
Get marker direction.
See setMarkerDir and setMarkerDirlocal
Used In:
ArmA
Example:
_dirc = markerDir "MarkerOne"
--------------------------------------------------------------------------------
markerPos markerName
Operand types:
markerName: String
Type of returned value:
Array
Description:
Get marker positon [x,z,y].
See setMarkerPos.
Note: This function is identical to getMarkerPos.
Used In:
ArmA/OFP
Example:
_mPos = markerPos "markerOne"
--------------------------------------------------------------------------------
markerSize markerName
Operand types:
markerName: String
Type of returned value:
Array
Description:
Get marker size.
See setMarkerSize.
Note: This function is identical to getMarkerSize.
Used In:
ArmA/OFP
Example:
_mSize = markerSize "MarkerOne"
« To Menu
--------------------------------------------------------------------------------
markerText markerName
Operand types:
markerName: String
Type of returned value:
String
Description:
Get marker text.
See setMarkerText and setMarkerTextLocal
Used In:
ArmA
Example:
_mText = markerText "MarkerOne"
--------------------------------------------------------------------------------
markerType markerName
Operand types:
markerName: String
Type of returned value:
String
Description:
Get type of marker.
See setMarkerType.
Note: This function is identical to getMarkerType.
Used In:
ArmA/OFP
Example:
? markerType "MarkerOne" == "Dot" : "MarkerOne" setMarkerType "Arrow"
--------------------------------------------------------------------------------
a max b
Operand types:
a:Number
b:Number
Type of returned value:
Number
Description:
The greater of a,b
Used In:
ArmA
Example:
3 max 2......result is 3
--------------------------------------------------------------------------------
a min b
Operand types:
a:Number
b:Number
Type of returned value:
Number
Description:
The smaller of a,b
Used In:
ArmA
Example:
3 min 2......result is 2
« To Menu
--------------------------------------------------------------------------------
missionConfigFile
Operand types:
None
Type of returned value:
Config
Description:
Return root of mission description.ext entries hierarchy.
Used In:
ArmA
--------------------------------------------------------------------------------
missionName
Operand types:
None
Type of returned value:
String
Description:
Return name of current mission.
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
missionStart
Operand types:
None
Type of returned value:
Array
Description:
Return time when mission started in format [year, month, day, hour, minute, second].
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
a mod b
Operand types:
a:Number
b:Number
Type of returned value:
Number
Description:
Remainder of a divided by b.
Note: Remainer is calculated in real domain.
Used In:
ArmA/OFP
Example:
_rem = 3 mod 2 ..........Result is 1
macguba
You can use mod to round a decimal number down to the nearest whole number.
For example:
If you wanted to use the command random to generate a whole number between 0 and 6, you could put this in a script:-
_rand = random 6
_num = _rand - (_rand mod 1)
« To Menu
--------------------------------------------------------------------------------
object modelToWorld modelPos
Operand types:
object:Object
modelPos:Array
Type of returned value:
Array
Description:
Converts position from object model space to world space.
Used In:
ArmA
--------------------------------------------------------------------------------
group move pos
Operand types:
group: Object or Group
pos: Array
Type of returned value:
Nothing
Description:
Creates a move waypoint on given position (format Position) and makes it an actual group waypoint.
Used In:
ArmA/OFP
Example:
groupOne move getPos player
--------------------------------------------------------------------------------
soldier moveInCargo vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Move soldier into vehicle cargo position (Immediate, no animation).
Used In:
ArmA/OFP
Example:
soldierOne moveInCargo jeepOne
tnl_
If you place a soldier in a vehicle with the moveInCargo command, he wont "know" he's in the vehicle.
Thus he won't disembark properly when the vehicle reaches a Transport Unload waypoint.
Therefore you have to use the assignAsCargo command, in order for the AI to catch on.
Something like this:
moveInCargo helo1
this assignAsCargo helo1
« To Menu
--------------------------------------------------------------------------------
soldier moveInCargo [vehicle, CargoIndex]
Operand types:
soldier: Object
[vehicle, CargoIndex]: Array
Type of returned value:
Nothing
Description:
Moves the soldier into a vehicle's specified cargo position. (Immediately, without animation).
Used In:
ArmA
Example:
soldierOne moveInCargo [jeepOne, 1]
--------------------------------------------------------------------------------
soldier moveInCommander vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Move soldier into vehicle commander position (Immediate, no animation).
Used In:
ArmA/OFP
Example:
soldierOne moveInCommander tankOne
--------------------------------------------------------------------------------
soldier moveInDriver vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Move soldier into vehicle driver position (Immediate, no animation).
Used In:
ArmA/OFP
Example:
soldierOne moveInDriver tankOne
« To Menu
--------------------------------------------------------------------------------
soldier moveInGunner vehicle
Operand types:
soldier: Object
vehicle: Object
Type of returned value:
Nothing
Description:
Move soldier into vehicle gunner position (Immediate, no animation).
Used In:
ArmA/OFP
Example:
soldierOne moveInGunner tankOne
--------------------------------------------------------------------------------
soldier moveInTurret [vehicle, turret path]
Operand types:
soldier:Object
[vehicle, turret path]: Array
Type of returned value:
Nothing
Description:
Moves the soldier into the vehicle's turret. (Immediately, without animation).
Used In:
ArmA
Example:
soldierOne moveInTurret [tank, [0, 0]]
--------------------------------------------------------------------------------
target moveTarget posDescription
Operand types:
target:Target
posDescription:Array
Type of returned value:
Nothing
Description:
Change information about a target (posDescription is [position, typeAccuracy, posAccuracy]).
Not yet implemented.
Used In:
ArmA
Example:
target moveTarget [position player,1,1]
--------------------------------------------------------------------------------
person moveTo position
Operand types:
person:Object
position:Array
Type of returned value:
Nothing
Description:
Low level command to person to move to given position.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
moveToCompleted person
Operand types:
person:Object
Type of returned value:
Boolean
Description:
Check if latest low level moveTo command is finished.
Used In:
ArmA
--------------------------------------------------------------------------------
moveToFailed person
Operand types:
person:Object
Type of returned value:
Boolean
Description:
Check if latest low level moveTo command failed.
Used In:
ArmA
--------------------------------------------------------------------------------
musicVolume
Operand types:
None
Type of returned value:
Number
Description:
Check current music volume (set by fadeMusic).
Used In:
ArmA/OFP
--------------------------------------------------------------------------------
« To Menu
N-O
N
Index
name
nearestBuilding
nearestObject
nearestObject
nearestObject
nearestObjects
nearObjects
nearTargets
needReload
nextWeatherChange
nil
not
name object
Operand types:
object: Object
Type of returned value:
String
Description:
Name of variable assigned to object in mission editor.
If used on vehicle, name of first crew member (in order commander, driver, gunner).
Used In:
ArmA/OFP
Example:
_name = name vehicle player
--------------------------------------------------------------------------------
nearestBuilding obj
Operand types:
obj: Object
Type of returned value:
Object
Description:
Nearest building to given object.
Used In:
ArmA/OFP
Example:
_nBuilding = nearestBuilding player
--------------------------------------------------------------------------------
nearestObject pos
Operand types:
pos: Array
Type of returned value:
Object
Description:
Nearest building of given type to given position or object.
Pos may be [x, y ,z, "type"] or [object, "type"].
Used In:
ArmA/OFP
Example:
_nObject = nearestObject [player, "StreetLamp"]
General Barron
Two notes here:
First - Although it says you can give it coordinates, you have to pass it an object or unit to search from.
Second - This command can only find objects up to 50 meters away.
« To Menu
--------------------------------------------------------------------------------
position nearestObject id
Operand types:
position:Array
id:Number
Type of returned value:
Object
Description:
Find object nearest to given position with given Visitor id.
Used In:
ArmA
Example:
obj = position player nearestObject 1234
--------------------------------------------------------------------------------
position nearestObject type
Operand types:
position:Array
type:String
Type of returned value:
Object
Description:
Find object nearest to given position with given type.
Used In:
ArmA
Example:
obj = position player nearestObject "Building"
--------------------------------------------------------------------------------
nearestObjects pos
Operand types:
pos:Array
Type of returned value:
Array
Description:
Returns a list of nearest objects of the given types to the given position or object, within the specified distance.
Pos may be using format [[x,y,z], ["type",...], limit] or [object, ["type",...], limit].
Used In:
ArmA
Example:
nearestObjects [player, ["Car","Tank"], 200]
« To Menu
--------------------------------------------------------------------------------
position nearObjects radius or [typeName, radius]
Operand types:
position:Object or Array
radius or [typeName, radius]:Number or Array
Type of returned value:
Array
Description:
Find objects in the circle with given radius.
If typeName is given, only objects of given type (or its subtype) are listed.
Used In:
ArmA
Example:
_list = position player nearObjects 50
--------------------------------------------------------------------------------
unit nearTargets distance
Operand types:
unit:Object
distance:Number
Type of returned value:
Array
Description:
Returns the list of targets within the given distance or range.
Targets may not be restricted to only enemy units.
For each target detected an array is created as a sub-array within the returned Array.
Each sub-array entry will consist of:
Position - A perceived quantity which will include judgement and memory errors.
Type - A perceived quantity giving only what was recognised.
Side - Perceived side.
Subjective Cost - Positive value for enemies, has greater value for important or more dangerous enemies.
Object - Object type, can be used to get more information if needed.
Used In:
ArmA
Example:
fred nearTargets 350
--------------------------------------------------------------------------------
needLoad vehicle
Operand types:
vehicle:Object
Type of returned value:
Number
Description:
Return how much vehicle wants to reload its weapons.
Used In:
ArmA
--------------------------------------------------------------------------------
nextWeatherChange
Operand types:
None
Type of returned value:
Number
Description:
Return the time (in seconds) when the next weather change will occur.
Used In:
ArmA
« To Menu
--------------------------------------------------------------------------------
nil
Operand types:
None
Type of returned value:
Any Value
Description:
Nil value.
This value can be used to undefine existing variables.
Used In:
ArmA/OFP
Example:
variableToDestroy = nil
--------------------------------------------------------------------------------
not a
Operand types:
a: Boolean
Type of returned value:
Boolean
Description:
Not a.
Used In:
ArmA/OFP
Example:
not false ....Result is true.

--------------------------------------------------------------------------------

O
Index
object
objNull
objStatus
onBriefingGear
onBriefingGroup
onBriefingNotes
onBriefingPlan
onBriefingTeamSwitch
onMapSingleClick
onPlayerConnected
onPlayerDisconnected
or
orderGetIn
overcast
overcastForecast
object id
Operand types:
id: Number
Type of returned value:
Object
Description:
Return object with given ID.
Object ID's can be checked in mission editor.
Used In:
OFP
Example:
_obj = object 1
macguba
To check object IDs in the Mission Editor click on "Show IDs" and zoom in close.
Available in v1.75 (Resistance) and above.
Tactician
Since version 1.85, you can't setPos island objects to get them out of the way, but you can use setDamage 1 to get trees or other flora out of the way.
--------------------------------------------------------------------------------
objNull
Operand types:
None
Type of returned value:
Object
Description:
Non-existent object.
This value is not equal to anything, not even to itself.
Used In:
ArmA/OFP
Example:
_it = player == objNull ..........Result is false.
--------------------------------------------------------------------------------
objectivenumber objStatus status
Operand types:
objectivenumber: String
status: String
Type of returned value:
Nothing
Description:
Set briefing objective status.
Status may be one of:
"ACTIVE"
"FAILED"
"DONE"
"HIDDEN"
Used In:
ArmA/OFP
Example:
"1" objStatus "FAILED"
« To Menu
--------------------------------------------------------------------------------
onBriefingGear sound
Operand types:
sound: String
Type of returned value:
Nothing
Description:
Define sound (voice) played the first time when section Gear in briefing is selected.
Used In:
ArmA/OFP
Example:
onBriefingGear "GearVoiceOver"
--------------------------------------------------------------------------------
onBriefingGroup sound
Operand types:
sound: String
Type of returned value:
Nothing
Description:
Define sound (voice) played the first time when section Group in briefing is selected.
Used In:
ArmA/OFP
Example:
onBriefingGroup "GroupVoiceOver"
--------------------------------------------------------------------------------
onBriefingNotes sound
Operand types:
sound: String
Type of returned value:
Nothing
Description:
Define sound (voice) played the first time when section Notes in briefing is selected.
Used In:
ArmA/OFP
Example:
onBriefingNotes "NotesVoiceOver"
« To Menu
--------------------------------------------------------------------------------
onBriefingPlan sound
Operand types:
sound: String
Type of returned value:
Nothing
Description:
Define sound (voice) played the first time when section Plan in briefing is selected.
Used In:
ArmA/OFP
Example:
onBriefingPlan "PlanVoiceOver"
--------------------------------------------------------------------------------
onBriefingTeamSwitch sound
Operand types:
sound: String
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.
Used In:
ArmA
Example:
onBriefingTeamSwitch "TeamSwitchVoiceOver"
--------------------------------------------------------------------------------
onMapSingleClick command
Operand types:
command:String
Type of returned value:
Nothing
Description:
Define action performed when user clicks in map.
Command receives:
_pos Array position
_units Array selected units
_shift, _alt Boolean key state
If click is processed, command should return true.
Used In:
ArmA/OFP
Examples:
onMapSingleClick {"SoldierWB" createUnit [_pos, group player]; true}
onMapSingleClick {grp1 move _pos; leader grp1 sidechat "Moving"; variable1 = true; onMapSingleClick {}}
KTottE
Here is a very, very useful link explaining more about onMapSingleClick.
« To Menu
--------------------------------------------------------------------------------
onPlayerConnected statement
Operand types:
statement:String
Type of returned value:
Nothing
Description:
This statement is launched whenever a player is connected to a MP session.
Variables _id and _name are set.
Used In:
ArmA
--------------------------------------------------------------------------------
onPlayerDisconnected statement
Operand types:
statement:String
Type of returned value:
Nothing
Description:
This statement is launched whenever a player is disconnected from a MP session.
Variables _id and _name are set.
Used In:
ArmA
--------------------------------------------------------------------------------
a or b
Operand types:
a: Boolean
b: Boolean
Type of returned value:
Boolean
Description:
a or b
Used In:
ArmA/OFP
Example:
not alive player or not alive leader player
« To Menu
--------------------------------------------------------------------------------
unitArray orderGetIn order
Operand types:
unitArray: Array
order: Boolean
Type of returned value:
Nothing
Description:
Force getting in vehicles to all units in the list.
Used In:
ArmA/OFP
Example:
[unitOne, unitTwo] orderGetIn true
toadlife
Note: Units must be assigned to a vehicle before this command will do anything.
See these commands for more info on this:
assignAsCargo
assignAsCommander
assignAsDriver
assignAsGunner
--------------------------------------------------------------------------------
overcast
Operand types:
None
Type of returned value:
Number
Description:
Return the current overcast.
Used In:
ArmA
--------------------------------------------------------------------------------
overcastForecast
Operand types:
None
Type of returned value:
Number
Description:
Return the overcast forecast.
Used In:
ArmA
--------------------------------------------------------------------------------
« To Menu
1 2 הבא >
חשבון משתמש
שלום אורח/ת

התחבר | משתמש חדש
בן כמה אתה