Unofficial Operation Flashpoint Command Reference Manual

Version 1.04

Revision History

Date

Version

Updater(s)

Notes

Jun 5th 2001

1.0

Lustypooh, Niosop

Initial Version

Jun 22th 2001

1.01

Smeagol

Added 4 new Commands by Spearhead

Sept 6th 2001

1.03

Fishion & Bloodmixer

Converted to HTML format to be more easily updated.
Added description.ext references.
Rearranged File.
Added Special Array Info.

Sept 6th 2001

1.03

Fishion & DeaDMeaT

Added Weapon and Ammo Names of Vehicles to the Weapon&Ammo List by DeadMeat

Nov 1st 2001

1.04

Simonpro - Commands from: Spinor, Backoff, Roach, and several others.

Added many commands, modified seven commands, corrected several errors.

Dec 19th, 2001 1.04a Tigershark Added Behaviour command discovered by Bob Curtis aka Soda

Table of Contents

Revision History

Table of Contents

Purpose

Alphabetized Command Listing

Appendix

A : Object Class Tree Appendix

B : Weapons and Ammo Object Tree

C : Game voices Appendix

D : Game Face Appendix

E : Character Animations Appendix

F : Action Type List Appendix

G : Weapon/Ammo List

H : Description.ext File Format

I : Campaign Description.ext File Format

J : USeful Mathematics for OFP



Purpose

This document provides descriptions of  the commands available to Operation Flashpoint mission/campaign developers.  These commands can be used to create custom scripts as well as within the Initialization, On Activation, On Deactivation, and Condition fields within the Official Mission Builder tool. In addition to the command descriptions, there are various Appendices which provide tables of information which will aid the mission developers. By no means is this document designed to teach someone how to use the Official Mission Builder.  It is assumed that the reader of this document is already familiar with the Official Mission Builder and has an idea on how scripts are used.



Alphabetized Command Listing

#GREEN COMMANDS ARE NEW COMMANDS
#RED COMMANDS HAVE TO BE RESEARCHED
 

Mathematical Functions

A - E

E - S

S - Z

Array
#$
#*
#%
#/
#^
#pi
#sin
#cos
#tan
#asin
#acos
#atan
#abs
#mod
#log
#ln
#deg
#rad
#exp
#sqrt
=
==
!=
<
<=
>
>=
-
+

Acctime
Action
AddAction
AddMagazine
AddMagazineCargo
AddRating
AddScore
AddWeapon
AddWeaponCargo
Alive
AllowDammage
AllowFleeing
AllowGetin
Ammo
And (&&)
AssignAsCargo
AssignAsCommander
AssignAsDriver
AssignAsGunner
Behaviour
Benchmark
BuildingPos
CadetMode
CamCommand
CamCommit
CamCommited
CamCreate
CamDestroy
CameraEffect
#CamSetBank
#CamSetDive
CamSetFOV
#CamSetFOVRange
CamSetPos
CamSetRelPos
CamSetTarget
CanFire
CanMove
CanStand
ClearMagazineCargo
ClearWeaponCargo
CombatMode
Commander
CommandFire
CommandFollow
CommandMove
CommandStop
CommandTarget
CommandWatch
#Count
CountEnemy
CountFriendly
CountSide
CountType
CountUnknown
#CutObj
#CutRSC
CutText
DayTime
#DebugLog
#DisableAI
DisableUserInput
Distance
DoFire
DoFollow
DoMove
DoStop
DoTarget
DoWatch
Driver
#
EnableEndDialog
EnableRadio
Exec
Exit
FadeMusic
FadeSound
#Fire
FlagOwner
Fleeing
FlyInHeight
ForceEnd
Foreach
Format
#FormLeader
GetDammage
GetDir
GetMarkerPos
GetPos
GlobalChat
GlobalRadio
GrpNull
Gunner
HandsHit
HasWeapon
Hint
Hintc
HintCadet
In
InFlame
InFlamed
IsNull
Join
KnowsAbout
#Land
Leader
LeaveVehicle
#Light
#List
#Local
Localize
#Lock
LockWP
MoveInCargo
MoveInCommander
MoveInDriver
MoveInGunner
#Name
NeareastBuilding
NearestObject
#NextWayPoint
ObjNull
ObjStatus
Or - II
OrderGetin
#Position
PlayMove
PlayMusic
PlaySound
#PublicVariable
Random
Rating
RemoveAction
RemoveAllWeapons
RemoveMagazine
RemoveMagazines
RemoveWeapon
Reveal SaveGame
SaveVar
Say
#Score
Select
SetAccTime
#SetAmmoCargo
SetBehaviour
SetCaptive
SetCombatMode
SetDammage
SetDir
SetFace
#SetFaceAnimation
SetFlagOwner
SetFlagSide
SetFlagTexture
SetFog
SetFormation
SetFormDir
SetFuel
#SetFuelCargo
SetGroupID
SetIdentity
SetMarkerPos
SetMarkerType
SetMimic
SetOverCast
SetPos
SetRadioMsg
#SetRepairCargo
SetSpeedMode
SetUnitPos
SetViewDistance
ShowCinemaBorder
ShowCompass
ShowGPS
ShowMap
ShownCompass
ShownGPS
ShownMap
ShownPad
ShownRadio
ShownWarrent
ShownWatch
ShowNotepad
ShowRadio
ShowWarrent
ShowWatch
Side
SideChat
SideRadio
SkipTime
SomeAmmo
#Speed
SpeedMode
Stop
Stopped
SwitchCamera
#SwitchLight
SwitchMove
#TextLog
#This
Time
#ThisList
TitleCut
#TitleObj
#TitleRSC
TitleText
UnassignVehicle
UnitReady
Units
Vehicle
VehicleChat
VehicleRadio



Special : 
Array

Description : 
How to use an array (list of elements)

Syntax :
MyArray = ["MyText1","MyText2",value, variable]

MyArray List of elements (array)

You can make a concatenation like this: 

MyArray1 = ["One", "Two"] 
MyArray2 = ["Three","Four"] 
GroupingArray = MyArray1 + MyArray2 

GroupingArray now contains "One", "Two","Three","Four" 
You can remove element in array too: 

MyArray1 = ["One", "Two","Three"] 
MyArray2 = ["One"] 
GroupingArray = MyArray1 - MyArray2 

GroupingArray now contains "Two","Three"

To remove the third element in an array: 

MyArray = MyArray - [MyArray select 2] 

Returns :
N/A

Example :
A short example to add a given player to an array (check if it isn't in array before you add it): 

_Player = _this select 0 
?!(_Player in PlayersArray):PlayersArray = PlayersArray + [_Player] 

And how to remove it: 

_Player = _this select 0 
?(_Player in PlayersArray): PlayersArray - [_Player] 

Where PlayersArray is an array variable containing a player list, in this case. 
MyString = format ["Target Name/Pos: %1, %2", EnemyUnit, getpos EnemyUnit]

 

Command : 
$

Description : 
Refers to a string in the string lookup table (stringtable.csv)

Syntax : 
???

Returns :
???

Example :
Hint localize "STRM_obj_enterleport1"

 

Command : 
*

Description : 
Multiplies two values

Syntax : 
sum = value1 * value2 

Returns :
The sum of value1 times value2

Example :
total = 20 * 8 

 

Command : 
%

Description : 
Returns the remainder of the division value1 % value2

Syntax : 
sum = value1 % value2 

Returns :
The remainder of the division value1 % value2

Example :
total = 8 % 2 

 

Command : 
/

Description : 
Divides two values

Syntax : 
sum = value1 / value2 

Returns :
The sum of value1 divided by value2

Example :
total = 20 / 8 

 

Command : 
^

Description : 
Returns the power of value1 by value2

Syntax : 
sum = value1 ^ value2 

Returns :
The power of value1 by value2

Example :
total = 2 ^ 8 

 

Command : 
pi

Description : 
Returns the pi

Syntax : 
pi 

Returns :
3.14... 

Example :
circle = 2*pi*_radius 

 

Command : 
sin

Description :
Returns the Sine of an angle. 

Syntax : 
sinofangle=sin value1 

Returns :
The sine of value1

Example :
sinnumber=sin 30 

 

Command : 
cos

Description :
Returns the Cosine of an angle. 

Syntax : 
cosineofangle=cos value1 

Returns :
The cosine of value1

Example :
cosnumber=cos 30 

 

Command : 
tan

Description :
Returns the Tan of an angle. 

Syntax : 
tanofangle=tan value1
Cannot be 90,270,450... Will give an error.
 

Returns :
The tan of value1

Example :
tannumber=tan 30 

 

Command : 
asin

Description :
Returns the arc sine of a number. 

Syntax : 
asinofangle=asin value1 

Returns :
The arc sine of value1

Example :
asinnumber=asin 30
Try this:
Sinnum=sin 30
Sinangle=asin sinnum You should get sinangle=30
 

 

Command : 
acos

Description :
Returns the arc cosine of a number. 

Syntax : 
acosofangle=acos value1 

Returns :
The arc cosine of value1

Example :
acosnumber=asin 30
Try this:
Cosnum=cos 30
Cosangle=acos cosnum You should get cosangle=30
 

 

Command : 
atan

Description :
Returns the arc tan of a number. 

Syntax : 
atanofangle=atan value1 

Returns :
The arc tan of value1

Example :
atannumber=atan 30
Try this:
Tannum=tan 30
Tanangle=atan tannum You should get tanangle=30
 

 

Command : 
Abs

Description :
Returns the positive value of a number 

Syntax : 
positivenum=abs value1 

Returns :
A positive number, if value1 is negaive the output will be a positive, if value1 is positive the output will still be positive.

Example :
positivenum=abs -100 

 

Command : 
Mod

Description :
Returns the remainder in a division sum. 

Syntax : 
value1 mod value2 

Returns :
The remainder of the division of value1/value2.
Note: This does not give you the answer for value1/value2, only the remainder of that operation.

Example :
remainervalue=10 mod 2
Typing 10 mod 2 will return 0,
Typing 10.6666 mod 2 will return 0.3333.
 


Command : 
Log

Description : 
Calculates the log (to base 10) of a value.

Syntax : 
lognum=log value1

Returns :
The log of value1

Example :
number=log 100
The log function is sort of the opposite to the power (^) function. Where that will give you Y=X^Z this will give you Z.
Eg: log 100 is 2, as the base is ten and 10^2 is 100.
Eg: log 1000 is 3, asthe base is ten and 10^3 is 1000.


Command : 
Ln

Description : 
Calculates the ln (to base e) of a value.

Syntax : 
lnnum=ln value1

Returns :
The ln of value1

Example :
number=ln 100
The ln function is similar to the log function, but this uses e as it's base instead of 10.
The ln function is sometimes known as napiers log.


Command : 
deg

Description : 
Converts a radian value into degrees.

Syntax : 
degreeval=deg radval

Returns :
The number of degrees equivalent to radval.

Example :
degval=deg pi
This will return 180 degrees.
One radian is about 57 degrees.
Therefore:
pi/2 is 90 degs
pi is 180 degs
3pi/2 is 270 degs and
2pi is 360 degs, see the pi command for more info.


Command : 
rad

Description : 
Converts a degrees value into radian measure.

Syntax : 
radval= rad degreeval

Returns :
The number of radians equivalent to degreeval.

Example :
radval=rad 180
This will return 3.14...,pi for short.
One radian is about 57 degrees. See the pi and deg commands for more info.


Command : 
exp

Description : 
Calculates a value using the exponential function.

Syntax : 
expval= exp value

Returns :
e^value.

Example :
expval=exp 2
This will return e^2.


Command : 
sqrt

Description : 
Calculates the square root of a number.

Syntax : 
sqrtnum= sqrt value

Returns :
The square root of value.

Example :
sqrtnum= sqrt 100, will return ten.
Test this function using y=x^2 then z=sqrt y,
the answer will be x.


Command : 
=

Description : 
Assign a value to a variable

Syntax : 
variable = value

Returns :
The value

Example :
myCounter = 10
myCounter = oldCounter


Command : 
==

Description : 
Checks if two values are equal to each other

Syntax : 
value1 == value2

Returns :
true if the two values are equal
false if the two values are not equal

Example :
? myCounter == 10 : aP globalchat "I am a ten!"


Command : 
!=

Description : 
Checks if two values are not equal to each other

Syntax : 
value1 != value2

Returns :
true if the two values are not equal
false if the two values are equal 

Example :
? myCounter != 10 : aP globalchat "I am not a ten?"


Command : 
<

Description : 
Checks if the first value is less than the second value

Syntax : 
value1 < value2

Returns :
true if the value1 is less than value2
false if the value1 is equal to or greater than value2

Example :
? myAmmo < 10 : aP globalchat "I need more ammo"


Command : 
<=

Description : 
Checks if the first value is less than or equal to the second value

Syntax : 
value1 <= value2

Returns :
true if the value1 is less than or equal to value2
false if the value1 is greater than value2

Example :
? myAmmo <= 10 : aP globalchat "I need more ammo"


Command : 
>

Description : 
Checks if the first value is greater than the second value

Syntax : 
value1 > value2

Returns :
true if the value1 is greater than value2
false if the value1 is equal to or less than value2 

Example :
? myAmmo > 10 : aP globalchat "I still have enough ammo"


Command : 
>=

Description : 
Checks if the first value is greater than or equal to the second value

Syntax : 
value1 >= value2

Returns :
true if the value1 is greater than or equal to value2
false if the value1 is less than value2

Example :
? myAmmo >= 10 : aP globalchat "I still have enough ammo


Command : 
-

Description : 
Subtracts one value from another value

Syntax : 
value1 - value2
 
You can also do :
- value2 which will return the negative value of value2

Returns :
The value after the subtraction

Example :
Mynewcount = oldcount - 30


Command : 
+

Description : 
Adds one value with another value

Syntax : 
value1 + value2

Returns :
The value after the addition

Example :
Mynewcount = oldcount + 30


Command : 
AccTime

Description : 
Returns current time acceleration factor.

Syntax : 
AccTime

Returns :
Value of current time acceleration factor. 
1 = normal passage of time
>1 = accelerated time passed 

Example :
_gamespeed = AccTime


Command : 
Action

Description : 
Have a unit perform a certain action in the game.

Syntax : 
unitName action ["actionType"]

unitName
is the name of the unit to do the action

actionType
is the action to perform. See the Action Type List

Returns :
N/A

Example :
aP action["STROKEGUN"]


Command : 
AddAction

Description : 
Adds an action to a units action menu.

Syntax : 
actionid=unit addaction["actiontext","actionscript"]
 
actionid is the name of your action, for use with the removeaction command
actiontext is the text which will appear on the units action menu.
actionscript is the scritp that will run when the user clicks on the action. It must be a file, not a command.
The action menu is called up using the middle mouse button or enter key in game.

Returns :
-

Example :
attack=player addaction["Attack the base!","attack.sqs"]


Command : 
AddMagazine

Description : 
Adds magazine to unit.

Syntax : 
UnitName AddMagazine "AmmoType"
 
UnitName is the name of the unit you want to give magazines

AmmoType is the type of magazine to give him. See the Weapons/Equipment List for valid ammunition types. 

Returns :
-

Example :
MyCrate AddMagazineCargo ["HK", 5]


Command : 
AddMagazineCargo

Description : 
Adds magazines to vehicle or ammo crate.

Syntax : 
UnitName AddMagazineCargo ["AmmoType", Quantity]

UnitName is the name of the vehicle or ammo crate you want to add magazines to.
  
AmmoType is the type of magazines to add. See the Weapons/Equipment List for valid ammunition types.
  
Quantity is the number of magazines to add to the vehicle or ammo crate.   

Returns :
-

Example :
MyCrate AddMagazineCargo ["HK", 5]


Command : 
AddRating

Description : 
Adds rating points to cumulative rating score.

Syntax : 
UnitName AddRating Points

UnitName Unit to add points to.

Points Number of points to add. To subtract points add a negative number. 

Returns :
-

Example :
player AddRating 1000


Command : 
AddScore

Description : 
Adds to score.

Syntax : 
UnitName AddScore Points

UnitName Unit to add points to.

Points Number of points to add. To subtract points add a negative number.

Returns :
-

Example :
Player1 AddScore 10


Command : 
AddWeapon

Description : 
Gives a unit the specified weapon if the unit has room. You may need to remove a weapon before adding a new one using the      RemoveWeapon command.

Syntax : 
UnitName AddWeapon "WeaponName"

UnitName is the name of the unit to give the weapon to.

WeaponName is the name of the weapon. See the Weapon/Equipment List for valid weapon types. 

Returns :
-

Example :
MySoldier AddWeapon "HK"


Command : 
AddWeaponCargo

Description : 
Adds weapons to a vehicle or ammo crate.

Syntax : 
UnitName AddWeaponCargo ["WeaponType", Quantity]
  
UnitName is the name of the vehicle or ammo crate you want to add weapons to
WeaponType is the type of weapon to add. See the Weapons/Equipment List for valid weapon types.

Quantity is the number of weapons to add to the vehicle or ammo crate. 

Returns :
-

Example :
MyCrate AddWeaponCargo ["M16", 3]


Command : 
Alive

Description : 
Returns whether or not a unit is alive.

Syntax : 
alive UnitName
  
UnitName is the name of the unit you want to check. 

Returns :
TRUE if unit is alive
FALSE if unit is dead

Example :
?(alive MyPet):addscore 10


Command : 
AllowDammage (! IS NO LONGER SUPPORTED IN PATCH v1.1)

Description : 
Sets whether unit can be damaged.

Syntax : 
UnitName AllowDamage TorF

UnitName is the name of the unit you want to affect.
TorF is either TRUE or FALSE

Returns :
-

Example :
StrongGuy AllowDamage FALSE


Command : 
AllowFleeing

Description : 
Sets whether a unit or group can flee. 

Syntax : 
Name allowfleeing Number

Name is the name of a unit or group
number is either 0 or 1
0 unit/group will not flee
1 unit/group can flee
 

Returns :
-

Example :
MySoldier allowfleeing 0
group this allowfleeing 1


Command : 
AllowGetIn

Description : 
Determines whether the selected units will want to enter a vehicle. Does not prohibit them from entering the vehicle.

Syntax : 
UnitArray AllowGetIn TorF

UnitArray is an array containing the units you want to set.

TorF is either TRUE or FALSE
TRUE Units are allowed to get in vehicle
FALSE Units are not allowed to get in vehicle
 

Returns :
-

Example :
[MySolder] AllowGetIn FALSE
(units group aP) AllowGetIn FALSE


Command : 
Ammo

Description : 
Used to check how much ammo is left in a weapon.

Syntax : 
UnitName Ammo "WeaponName"
  
UnitName is the name of the unit you are checking
WeaponName is the name of the weapon you want to check. Check the Weapon/Ammo Type List for valid ammo types.

Returns :
Number of rounds remaining in the weapon. So for an M16 this will be 0-30, for a LAW 0-1

Example :
?(MyGuy ammo "M16" == 0):aP sidechat "Reload damn it!"


Command : 
And (also &&)

Description : 
Logical operator to return true if both of two expressions is true

Syntax : 
expression1 and expression2
 
expression1 is the first expression to check. It must be able to return a true/false value.
expression2 is the second expression to check. It must be able to return a true/false value.
 

You can also have multiple and commands in your expression. For example :
? (mycounter ==0) and (alive myUnit) and (checkflag) : aP globalchat  hello 

You can also use && as well in place of or.

Returns :
TRUE if both expressions are true
FALSE if either expression is false

Example :
? (mycounter == 0) and (alive myUnit) : aP globalchat  Time ran out! 


Command : 
AssignAsCargo

Description : 
Tells the selected unit to take the cargo position when entering the selected vehicle. Does not make the unit enter the vehicle, that must still be done with a GET IN waypoint or the ordergetin command

Syntax : 
UnitName AssignAsCargo VehicleName 
 
UnitName is the name of the unit you want to assign to the cargo position
VehicleName is the vehicle in which the unit should take the cargo position. 

Returns :
-

Example :
MySoldier AssignAsCargo MyTruck
"_x AssignAsCargo MyTruck" foreach (units group aP)


Command : 
AssignAsCommander

Description : 
Tells the selected unit to take the commander position when entering the selected vehicle. Does not make the unit enter the vehicle, that must still be done with a GET IN waypoint or the ordergetin command.

Syntax : 
UnitName AssignAsCommander VehicleName

UnitName is the name of the unit you want to assign to the commander position
VehicleName is the vehicle in which the unit should take the commander position 

Returns :
  -

Example :
MyOff AssignAsCommander MyTank


Command : 
AssignAsDriver

Description : 
Tells the selected unit to take the driver position when entering the selected vehicle. Does not make the unit enter the vehicle, that must still be done with a GET IN waypoint or the ordergetin command.

Syntax : 
UnitName AssignAsDriver VehicleName

UnitName is the name of the unit you want to assign to the driver position
VehicleName is the vehicle in which the unit should take the driver position  

Returns :
  -

Example :
MyGuy AssignAsDriver MyJeep


Command : 
AssignAsGunner

Description : 
Tells the selected unit to take the gunner position when entering the selected vehicle.  Does not make the unit enter the vehicle, that must still be done with a GET IN waypoint or the ordergetin command

Syntax : 
UnitName AssignAsDriver VehicleName

UnitName is the name of the unit you want to assign to the gunner position
VehicleName is the vehicle in which the unit should take the gunner position 

Returns :
-

Example :
MySoldier AssignAsGunner MyBMP


Command : 
Behaviour

Description : 
Returns the specified unit's behaviour mode

Syntax : 
Behaviour UnitName

Returns :
One of the following string values:

"SAFE"=Secure. Everything okay. Gun on back. Makes vehicledriver use roads.

"AWARE"=stay alert,go prone when you are prone, won't automatically go to cover

"COMBAT"=uses lots of Prone and Sprinting to Advance

"CARELESS"=Don't give a shit. Don't react even if grenade lands near them.

"STEALTH"=unit will use cover, prone movement to advance.

Example :
?(behaviour aP == "COMBAT"):aP sidechat "Watch out, I see the enemy!"

 

Command : 
Benchmark

Description : 
Returns number known as "CPU benchmark result" in preferences screen. By using this command you can build scalable missions. For example, you might tone down the viewing distance if the player's CPU can't handle it or you could decide not to display some units in the mission to reduce the CPU requirements.

Syntax : 
benchmark

Returns :
A numeric value indicating the CPU benchmark for the player's computer. The higher the value the better the performance. e.g 1453

Example :
?(benchmark < 1000):setviewdistance 400


Command : 
BuildingPos

Description : 
Used to find the coordinates of a building.

Syntax : 
BuildingID BuildingPos Number
 
BuildingID is a Building ID. This can be gotten with the NearestBuilding command.

Number is either 1 or 0. These appear to get slightly different locations w/in the building, off from each other by about 2-3 meters. 

Returns :
A coordinates array consisting of x,y,z coordinates for the building.

Example :
MyBuild BuildingPos 1


Command : 
CadetMode

Description : 
Returns status of player playing in Cadet Mode.

Syntax : 
CadetMode

Returns :
TRUE or FALSE 
  
If TRUE then user is playing in Cadet Mode
If FALSE then user is playing in Veteran Mode 

Example :
presenceCondition not cadetMode
?(cadetmode):EnemyBMP SetDammage .8


Command : 
CamCommand

Description : 
Allows you to send various commands to a specified camera.

Syntax : 
cameraId CamCommand  "command" 

cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate command.

command is the command to send. Valid values are :
         
  - "manual on"   gives camera control to the player
  - "manual off"  disables camera control to the camera
  - "inertia on"    camera can move through walls/objects
  - "inertia off"    camera can not pass through walls and objects

Returns :
-

Example :
_mycamera CamCommand  manual on 


Command : 
CamCommit

Description : 
Commits all the changes done to a camera all at once.

Syntax : 
cameraId CamCommit duration

cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate command. 

duration specifies the time (in seconds) to take to transition to the new settings. A  value of 0 means instantaneously while any other time will cause a smooth transition.  

Returns :
-

Example :
_mycamera CamCommit 3.5

Notes:
Changes you make to the camera with the other commands will NOT take effect until you issue this command.


Command : 
CamCommitted

Description : 
CamCommitted cameraId
 
cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate command. 

Syntax : 
CadetMode

Returns :
TorF
True indicates the camera is finished committing its changes
False indicates the camera is not finished committing its changes

Example :
CamCommitted _mycamera

Notes:
You can use the wait command (@) with (e.g. @CamCommitted _mycamera). But keep in mind that this halts the script until the camera is finished. In some cases you may not want to do this but instead manually wait with the delay command (~) and do   something else in the script while the transition occurs.


Command : 
CamCreate

Description : 
Creates a new camera , but can also be used to create a new object.

Syntax : 
cameraType  camCreate [X,Y,Z]

cameraType specifies the type of camera to create. Valid values are :
"camera" -  regular camera
"seagull" - seagull camera

Notes :
To add an object from within a script :

cameraID = "objecttype" CamCreate [x,y,z]

cameraID specifies the name of the object
objecttype is an object from the Object Class Tree  

Returns :
Camera Identfier for this camera. Used to reference this camera when using any  of the camera commands

Example :
_mycamera = "camera" camCreate [3000,2500,20]

NewTank = "M1Abrams" camCreate [3000,2500,0]


Command : 
CamDestroy

Description : 
Destroy a previously created camera.

Syntax : 
camDestroy cameraId
 
cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate command.
 

Returns :
N/A

Example :
camDestroy _mycamera


Command : 
CameraEffect

Description : 
Sets an effect for the specified camera.

Syntax : 
cameraId cameraEffect [ effect , position ]

cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate          command.

effect is the camera effect. Valid values are :

TERMINATE  - Terminates the camera's effect
TRANSITION  - ??
BOOMANDZOOM  - ??
ZOOMOUT  - Zooms the camera out
ZOOMIN  - Zooms the camera in
ALIGNED  - ??
EXTERNAL_FIX  - External?
EXTERNAL  - ?
FOLLOW_FAR  - Follows a vehicle from afar
FOLLOW_NEAR  - Follows a vehicle closely
TRACKING  - Static Camera with zoom
STATIC  - Static Camera
NONE  - No effect
TIMED  - ??
INTERNAL  - ??
INTERPOLATED  - ??
CHAINED  - ??camDestroy cameraI 

Position indicates the camera position in relation to the camera target. Valid values are:

BOTTOM 
BACKTOP
FRONTTOP 
RIGHTTOP 
LEFTTOP 
RIGHTBACK 
LEFTBACK 
RIGHTFRONT 
LEFTFRONT 
BACK 
FRONT 
RIGHT 
LEFT 
TOP 

Returns :
N/A

Example :
mycamera cameraEffect ["internal","back"]


Command : 
CamSetBank

Description : 
Does not seem to work

Syntax : 
 

Returns :
 

Example :
 


Command : 
CamSetDive

Description : 
Does not seem to work

Syntax : 
 

Returns :
 

Example :
 


Command : 
CamSetFOV

Description : 
Sets the field of view for the specified camera

Syntax : 
cameraId CamSetFOV fov

cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate        command.

fov is the field of view. A value > 1 zooms out the view. A value < 1 zooms in the view  

Returns :
N/A

Example :
_mycamera camSetFOV 0.538


Command : 
CamSetFOVRange

Description : 
?

Syntax : 
?

Returns :
?

Example :
?


Command : 
CamSetPos

Description : 
Sets the map position of the camera.

Syntax : 
cameraId CamSetPos[X,Y,Z]

cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate command.

X is the X map coordinate for this camera
Y is the Y map coordinate for this camera
Z is the Z map coordinate for this camera  

Returns :
N/A

Example :
_mycamera camSetPos [7960.74,5958.81,10.28]


Command : 
CamSetRelPos

Description : 
Adjusts the camera's map position in relation to it's target's map coordinates

Syntax : 
cameraId CamSetPos[X offset,Y offset,Z offset]

cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate command.

Xoffset is the X map coordinate offset (pos or neg) for this camera
Yoffset is the Y map coordinate offset (pos or neg) for this camera
Zoffset is the Z map coordinate offset (pos or neg) for this camera  

Returns :
N/A

Example :
_mycamera camSetRelPos [245.34,-127.50,31.56]


Command : 
CamSetTarget

Description : 
Sets the target of the specified camera

Syntax : 
There are two syntaxes for this command :

Syntax 1
cameraId CamSetTarget[X,Y,Z]

cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate command.

X is the X map coordinate to point the camera at
Y is the Y map coordinate to point the camera at
Z is the Z map coordinate to point the camera at

Syntax 2

cameraId CamSetTarget unitName

cameraId is the identifier for the camera. It is the variable which stores the return value from the CamCreate command.

unitName is the name of the unit you want the camera to point at and track.      

Returns :
N/A

Example :
_mycamera camSetTarget [-85002.95,-30899.97,182.26]
_mycamera camSetTarget myjeep


Command : 
CanFire

Description : 
Returns if a unit can fire or not. Does not take ammunition into account. Will always be TRUE for live infantry units. more useful for vehicles.

Syntax : 
CanFire UnitName

UnitName is the name of the unit you are checking. 

Returns :
TRUE or FALSE

TRUE - The unit can fire
FALSE - The unit cannot fire
 

Example :
?(!canfire MyTank):MyTank sidechat "Unable to fire!"


Command : 
CanMove

Description : 
Returns if a unit can move or not. Does not take feul into account. Will always be TRUE for live infantry units. More useful for vehicles.

Syntax : 
CanMove UnitName

UnitName is the name of the unit you are checking.

Returns :
TRUE or FALSE

TRUE - The unit can move
FALSE - The unit cannot move

Example :
?(!canmove MyTank):MyTank sidechat "Cannot move!"


Command : 
CanStand

Description : 
Returns whether the selected unit can stand. Returns false for vehicles.

Syntax : 
CanStand UnitName

UnitName is the name of the unit you are checking.

Returns :
TRUE or FALSE

TRUE - The unit can stand
FALSE - The unit cannot stand

Example :
GuyCanWalk = canstand MyGuy


Command : 
ClearMagazineCargo

Description : 
Removes all ammunition from the cargo space of a vehicle or ammo crate. 

Syntax :
ClearMagazineCargo
UnitName

UnitName is the name of the vehicle or ammo crate from which to remove all ammo from cargo. 

Returns :
N/A

Example :
ClearMagazineCargo this


Command : 
ClearWeaponCargo

Description : 
Removes all weapons from a vehicle or ammo crate.

Syntax :
ClearWeaponCargo
UnitName

UnitName is the name of the vehicle or ammo crate from which to remove all weapons from cargo. 

Returns :
N/A

Example :
ClearWeaponCargo MyCrate


Command : 
CombatMode

Description : 
Returns the specified unit's combat mode.

Syntax :
CombatMode
UnitName

UnitName is the name of the unit who's combat mode you wish to check. 

Returns :
One of the following string values:

"BLUE"=Never Fire
"GREEN"=Hold Fire
"WHITE"=Hold Fire, Engage At Will
"YELLOW"=Open Fire (stay where you are at)
"RED"=Open Fire, Engage At Will (seek targets but stay near leader)

Additional notes : If you want to make a "guard" set him on combatmode white or red, otherwise he will not shoot if he sees the enemy. 

Example :
?(combatmode aP == "GREEN"):aP sidechat "Request permission to fire!"


Command : 
Commander

Description : 
Returns the commander of the specified vehicle.

Syntax :
commander
UnitName

UnitName is the name of the vehicle

Returns :
The identifier for the unit commanding UnitName

Example :
(commander myTank) globalchat "I was born to command!"


Command : 
CommandFire

Description : 
Causes leader of unit to order unit to fire at specified target

Syntax :
UnitName CommandFire TargetUnit

UnitName is the name of the unit you want to be command to fire.
UnitArray is an array of units to be issued the fire command.
TargetUnit is the name of the unit you want to be fired upon. 

Returns :
N/A

Example :
MySoldier CommandFire EnemySoldier
units group MySoldier CommandFire EnemySoldier

Notes:
When passing an array of units, the array will only be processed until a unit in a different group than the first unit in the array is found. So if unit1 and unit2 are in group1, and unit3 and unit4 are in group2, and you use [unit1,unit2, unit3,unit4] CommandFire enemyunit, only unit1 and unit2 will receive the fire command.


Command : 
CommandFollow

Description : 
Causes leader of unit to command unit to follow specified unit. Effectively causes leader to issue "Return to formation" radio command to unit. This will not cause a unit to follow any other unit but it's leader. Use the Join command for that

Syntax :
UnitName CommandFollow LeaderName
UnitArray CommandFollow LeaderName

UnitName is the name of the unit you want to give the command to.
UnitArray is an array of units you want to be issued the follow command
LeaderName is the name of the unit UnitName should follow. 

Returns :
N/A

Example :
MySoldier CommandFollow (MySolder leader)
[MySoldier1, MySolder2] CommandFollow leader MySolder1 

Notes:
When passing an array of units, the array will only be processed until a unit in a different group than the first unit in the array is found. So if unit1 and unit2 are in group1, and unit3 and unit4 are in group2, and you use [unit1,unit2,unit3,unit4] CommandFollow leader unit1, only unit1 and unit2 will receive the follow command. Also, if the group leader is specified in the unit array, the function will not work. 


Command : 
CommandMove

Description : 
Causes leader of units to order selected units to move to specified coordinates. 

Syntax :
UnitName CommandMove Coordinates

-or- 

UnitArray CommandMove Coordinates

UnitName is the name of the unit to receive the move order.
UnitArray is an array of units to receive the move order.
Coordinates is the x,y,z coordinates of the position to be moved to. 

Returns :
N/A

Example :
Soldier1 CommandMove [1000,1000]
[Soldier1, Soldier2] CommandMove GetMarkerPos "Marker1"

Notes:
When passing an array of units, the array will only be processed until a unit in a different group than the first unit in the array is found. So if unit1 and unit2 are in group1, and unit3 and unit4 are in group2, and you use [unit1,unit2,unit3,unit4] CommandMove [10,30], only unit1 and unit2 will receive the move command. If the group leader is included in the nit array, only he will receive the move command and will move to ordered postion. The others may follow him if they are in formation, but if the leader is killed, a new leader will be assigned who will attempt to continue following waypoints, or if no more waypoints are defined, move back to last waypoint.


Command : 
CommandStop

Description : 
Causes leader of unit to order specified unit to "Halt".

Syntax :
CommandStop
UnitName

-or-

CommandStop UnitArray

UnitName is the name of the unit you want to be issued the "Halt" order.

UnitArray is an array of units to be issued the "Halt" order 

Returns :
N/A

Example :
CommandStop MySoldier
CommandStop [Soldier1, Soldier2]

Notes:

When passing an array of units, the array will only be processed until a unit in a different  group than the first unit in the array is found. So if unit1 and unit2 are in group1, and unit3 and unit4 are in group2, and you use CommandStop [unit1,unit2,unit3,unit4], only unit1 and unit2 will recieve the halt command. If the group leader is included in the unit array, only he will recieve the halt command and will halt. The others in group will halt if in formation, but if the leader is killed, they will continue onto next waypoint or if no more waypoints are defined, to the last waypoint. 


Command : 
CommandTarget

Description : 
Causes leader of unit to order targeting of specified unit

Syntax :
UnitName CommandTarget TargetName

-or-

UnitArray CommandTarget TargetName

UnitName is the name of the unit to be issued the target command.
UnitArray is an array of units to be issued the target command.
TargetName
is the name of the unit to be targeted. 

Returns :
N/A

Example :
Soldier1 CommandTarget Enemy1
units group Soldier1 CommandTarget Enemy1

Notes:
When passing an array of units, the array will only be processed until a unit in a different group than the first unit in the array is found. So if unit1 and unit2 are in group1, and unit3 and unit4 are in group2, and you use [unit1,unit2,unit3,unit4] CommandTarget EnemyUnit, only unit1 and unit2 will recieve the Target command. 


Command : 
CommandWatch

Description : 
Causes leader of unit to order unit to watch target.

Syntax :
UnitName CommandWatch TargetName

-or-

UnitArray CommandWatch TargetName

UnitName is the name of the unit to be issued the watch command.
UnitArray is an array of units to be issued the watch command.
TargetName is the name of the unit to be watched.

Returns :
N/A

Example :
Soldier1 CommandWatch Civ1
units group Soldier1 CommandWatch Civ1

Notes:
When passing an array of units, the array will only be processed until a unit in a different group than the first unit in the array is found. So if unit1 and unit2 are in group1, and unit3 and unit4 are in group2, and you use [unit1,unit2,unit3,unit4] CommandWatch EnemyUnit, only unit1 and unit2 will receive the watch command

 

Command : 
Count

Description : 
This command counts the number of elements in an array

Syntax :
Count Array

Array is the list of elements that will be looked through.

Returns :
Number of elements.

Example :
BodyCount = count PeopleDeadArray
NumberOfMen = count units _triggerlist 


Command : 
CountEnemy

Description : 
This command goes through an array, checking if UnitName knows about each one, and if each one that he knows about is an enemy.

Syntax :
UnitName CountEnemy UnitArray

UnitName is the name of the unit you wish to count enemies.
UnitArray is a list of units that will be looked though..

Returns :
Number of enemy units in list that unit knows about.

Example :
EnemyNumber = MyGuy CountEnemy ListOfAllUnits


Command : 
CountFriendly

Description : 
This command goes through an array, checking if UnitName knows about each one, and if each one is a friendly unit. .

Syntax :
UnitName CountFriendly UnitArray

Unitname is the name of the unit you wish to count enemies.
UnitArray is the list of units that will be looked through. 

Returns :
FriendsNumber = MyGuy CountFriendly ListOfAllUnits

Example :
Note that empty units are considered friendly. Also note that if the unit doing the counting is in the list passed to CountFriendly, it will count itself as a friendly unit.


Command : 
CountSide

Description : 
Counts the number of units of specified side in an array of units. Only counts units that are alive. .

Syntax :
Side CountSide UnitArray

Side is the side of the units you want to count. Valid sides are:

EAST
WEST
CIV
GUER
LOGIC


UnitArray
is the array of units that CountSide will check.  

Returns :
Number of units of side Side in array UnitArray 

Example:
MyEnemies = WEST CountSide MyList


Command : 
CountType

Description : 
Counts the number of units of a certain type in a list..

Syntax :
"Type" CountType UnitArray

Type is the type of unit you are counting. See Object Class Tree for valid types.
UnitArray is an array of units/objects to be counted. 

Returns :
Number of units of type specifed in the array.

Example :
TanksLeft = "Tank" CountType ListOfMyUnits

Notes:
When specifying a type, note that it will count all units of type specified and all units derived from that type. For instance, if you pick type tank, it will cound all tanks, and all APC's, as well as M113's and BMPs, since they derived from the APC class. 
 


Command : 
CountUnknown

Description : 
Returns how many units in a list a unit is unaware of.

Syntax :
UnitName CountUnknown UnitArray

UnitName is the name of the unit you are checking for awareness.
UnitArray is a list of units that will be checked. 

Returns :
Returns a count of how many units in the list the unit is unaware of.

Example :
?(MyGuy CountUnknown [Tank1, Tank2] < 2):MyGuy SideChat "Tank spotted!"

Notes:
If the unit knows about a unit, but is unsure of it's side, it will not be reported by the CountUnknown command.


Command : 
CutObj

Description : 
Puts an overlay object on the screen.

Syntax :
Cutobj
[objectname , textposition ,num]

objectname identifies the overlay object. Valid values are :  tvset 

There are others. Need to look them up

textPosition indicates where to display text on screen in this view mode. Possible

values are :

"PLAIN DOWN" - Plain text in lower part of screen
"PLAIN" - Plain text in center of screen 

num is ???   

Returns :
N/A

Example :
cutobj ["tvset","plain down",100]


Command : 
CutRSC

Description : 
Puts an overlay resource on the screen. Not sure what the difference between cutobj and cutrsc is.

Syntax :
cutrsc [
resourcename , textposition ,num]

resourcename identifies the overlay resource. Valid values are :

"default" - Back to normal view
"binocular" - Binoculars view
"creditsback" 
"creditsbackBIS" 
"creditsbackCM" 
"Endof" 
"foto" - Photograph border 

There are others. Need to look them up

textPosition indicates where to display text on screen in this view mode. Possible

values are :

"PLAIN DOWN" - Plain text in lower part of screen
"PLAIN" - Plain text in center of screen 

num is ???   

Returns :
N/A

Example :
cutrsc ["foto","plain down",100] 


Command : 
CutText

Description : 
Allows you to display text on screen.

Syntax :
CutText ["text",textPosition,fadeinDuration]

text is the text to display on screen
textPosition indicates where to display it on screen. Possible values are :

"PLAIN DOWN" - Plain text in lower part of screen
"PLAIN" - Plain text in center of screen

fadeinDuration is the amount of time (in seconds) to fade in the text 

What is the difference with the titletext command ?

Returns :
N/A

Example:
CutText ["Guns of Steel","PLAIN",10]

Notes:
You can add multiple lines to the screen by using "\n" in your text to denote a linefeed. For example, CutText["Guns of Steel\nSon of a Gun","PLAIN",10] 


Command : 
DayTime

Description : 
Returns the game's current time of day..

Syntax :
DayTime

Returns :
Current time of day in hours. 2:30 PM would be 14.5

Example:
MyTime1 = DayTime


Command : 
DebugLog

Description : 
??? I did not see this used in the official missions and campaign.

Does this output game info into a log file?

Syntax :
??

Returns :
??

Example :
??


Command : 
DisableAI

Description : 
Allows you to disable a portion of the AI for a specified unit

Syntax :
unitName DisableAI  aiArea 

aiArea indicates the area of the AI to disable. Valid values are :

"target" - ?
"autotarget"   Automatically targeting
"move"   Automatically moving 

Returns :
N/A

Example:
dude disableAI  move 


Command : 
DisableUserInput

Description : 
Disables/Enables processing of input (keyboard/mouse/joystick) by user

Syntax :
DisableUserInput
TorF

TorF is either TRUE or FALSE

TRUE - User input will not be processed.
FALSE - User input will be processed. 

Returns :
N/A

Example :
DisableUserInput TRUE

Notes:
This command appears to disable processing of input by the game. So when set to TRUE, NO keys will be processed. This includes the ESC key. User may still ALT-TAB or CTRL-ALT-DELETE as these are trapped by windows before the game processes them.


Command : 
Distance

Description : 
Used to find the distance between 2 units/objects.

Syntax :
Name1 Distance Name2

Name1 is the name of a unit or object.
Name2 is the name of a second unit or object 

Returns :
Distance in meters between Name1 and Name2.

Example:
?(MyGuy Distance MyLeader > 300):MyLeader SideChat "Get over here!"


Command : 
DoFire

Description : 
Causes a unit to fire on another.

Syntax :
Unit1 DoFire Unit2

Unit1 is the unit you want to fire.
Unit2
is the unit you want to be fired upon. 

Returns :
N/A

Example :
If the unit ordered to fire is the player character, a target box will appear over the target. This is similar to the CommandFire command, except no radio command is given.


Command : 
DoFollow

Description : 
Causes selected unit to follow a unit. Effectively makes him return to formation. This command will not cause him to follow anyone but his leader. Use the Join command to do that.

Syntax :
Unit1 DoFollow LeaderUnit

Unit1 is the unit you want to return to formation.
LeaderUnit is the leader of Unit1

Returns :
N/A

Example :
MyGuy DoFollow leader MyGuy

Notes:
Similar to the CommandFollow command execpt the DoFollow command will not cause the leader to issue a radio command. If Unit1 is a player controled unit, there will be no effect


Command : 
DoMove

Description : 
Causes a unit to move to specified coordinates.

Syntax :
UnitName DoMove Coordinates

UnitName is the name of the unit you want to move.
Coordinates are the x,y coordinates of the place you want him to move. 

Returns :
N/A

Example :
MyGuy DoMove getpos BadGuy
MyGuy DoMove [4300, 5400]


Command : 
DoStop

Description : 
Causes a unit to halt.

Syntax :
DoStop UnitName

UnitName is the name of the unit you want to stop. 

Returns :
N/A

Example :
DoStop MyGuy


Command : 
DoTarget

Description : 
Causes a unit to target another.

Syntax :
UnitName DoTarget TargetName

UnitName is the name of a unit.
TargetName is the name of the unit to be targeted. 

Returns :
N/A

Example :
MyGuy DoTarget EnemyGuy 


Command : 
DoWatch

Description : 
Causes a unit to watch another.

Syntax :
Unit1 DoWatch Unit2

Unit1 is the name of the unit you want to do the watching.
Unit2 is the name of the unit to be watched. 

Returns :
N/A

Example :
MyGuy DoWatch leader MyGuy


Command : 
Driver

Description : 
Returns the driver of the specified vehicle

Syntax :
driver UnitName

UnitName is the name of the vehicle 

Returns :
The identifier for the unit driving UnitName

Example :
(driver myTruck) globalchat "Full speed ahead!"


Command : 
EnableEndDialog

Description : 
?? Not sure what this is used for. Saw in a couple death sqs files.

Syntax :
EnableEndDialog

Returns :
??

Example:
EnableEndDialog


Command : 
EnableRadio

Description : 
Sets whether the player can see and hear radio messages..

Syntax :
EnableRadio TorF

TorF is either TRUE or FALSE

TRUE - Player can see and hear radio messages
FALSE - Player can neither see nor hear radio messages 

Returns :
N/A

Example :
EnableRadio FALSE

Note:

This will not stop the player from sending radio messages, orders, or codes, only his ability to recieve them and hear himself sending. 


Command : 
Exec

Description : 
Used to execute a script file.

Syntax :
Arg
Exec "Scriptname.sqs"
-or-
[Arg1, Arg2,...ArgN] Exec "Scriptname.sqs"

Arg, Arg1, etc are the arguments you wish to pass to the script. 
Scriptname is the name of the script file you wish to execute.

Returns :
N/A

Example :
MyGuy Exec "RunAround.sqs"
units group MyGuy Exec "Scatter.sqs"

*** Notes :
A script is a text file with commands, the advantage of a script is the ability to use random events and then use it it send to send it to a script. Also, it is much easier to write all commands in a scriptfile rather than the small activation/initialisation field. A script has the extension ".sqs"

There are also a group of "reserved" scripts. One of these is the "init.sqs" When you give your script this name, it will automaticly be loaded BEFORE your mission, so there is no need to use the EXEC command. One of the uses is to set specific conditions in multiplayer, such as :

?(side == WEST):goto "westconditions"
or
?(player == MyUnitName):goto "playerconditions"

Another reserved script is the "camera.sqs" script, place the following in the initialisation field of the player unit.
PlayerUnitName exec "camera.sqs";
This will activate as you start the game and turns the player into a camera. Useful for debugging your mission, or creating cutscenes.


Command : 
Exit

Description : 
Used to exit a script that is running. 

Syntax :
Exit

Returns :
N/A

Example :
?(counter ==10):Exit


Command : 
FadeMusic

Description : 
Decrease/increase the volume of the games music.

Syntax :
transitionTime FadeMusic volume

transitionTime is the time over which to do the change (in seconds) adjustment is the volume adjustment. If greater than 1 then it will increase the volume. If < 1 then the volume will be decreased. 

Returns :
N/A

Example:
4 fadeMusic 0.5


Command : 
FadeSound

Description : 
Decrease/increase the volume of the game s sound. 

Syntax :
transitionTime
FadeSound volume

transitionTime is the time over which to do the change (in seconds) adjustment is the volume adjustment. If greater than 1 then it will increase the volume. If < 1 then the volume will be decreased.

Returns :
N/A

Example:
4 fadeSound 0.4

 

Command : 
Fire

Description : 
Lets a unit fire. 

Syntax :
Unitname
Fire [Weapon, Ammo]

Returns :
N/A

Example:
Soldier1 fire ["throw","SmokeShellRed","SmokeShellRed"]


Command : 
FlagOwner

Description : 
Used to determine who owns a flag.

Syntax :
FlagOwner FlagName

FlagName is the name of a flag.

Returns :
Unit that owns the flag.

Example:
WhoHas = FlagOwner usaFlag 


Command : 
Fleeing

Description : 
Used to determine if a unit is fleeing

Syntax :
Fleeing UnitName

UnitName is the name of a unit. 

Returns :
TRUE if unit is fleeing
FALSE if unit is not fleeing

Example:
?(Fleeing EnemyChopper):MyChopper SideChat "He's bugging out."


Command : 
FlyInHeight

Description : 
Causes an aircraft to fly at a specific height. 

Syntax :
UnitName
FlyInHeight Number

UnitName is the name of an air unit.
Number is the height, in meters, you want him to fly at. 

Returns :
N/A

Example:
MyHeli FlyInHeight 100

Notes:
Only helicopters seem to be affected by this command. Only heights of less than 110 meters are reliable.  The helicopter will only switch heights in between waypoints, issuing this command to a stationary helicopter will have no effect. 


Command : 
ForceEnd

Description : 
Forces the mission to end

Syntax :
ForceEnd

Returns :
N/A

Example :
ForceEnd


Command : 
Foreach

Description : 
Performs an operation on every element in an array

Syntax :
"_x Command"  ForEach Array

Command is the command you want to execute. You use the reserved variable _x  in that command where you want to put the current element in the array.

Array is the array to use.  

Returns :
N/A

Example :
"_x AllowDammage false"  ForEach (units group Mygroup)
"_x setDir 0"  ForEach SalutingSoldiersArray  <<< array of unit names btw


Command : 
Format

Description : 
Used to create a String out of other data types.

Syntax :
format [
"String", arg1, arg2,  . argn]

String is any text you want to be in the returned string. Imbedded within this string are argument placeholders (%1,%2 all the way to %n). These placeholders will be replaced with the values of the arg1,arg2 argn arguments passed in.

arg1 through argn are the variable/array/unit/object/numbers you want to be put in place of those argument placeholders.

Returns :
A string consisting of the specified string and all data

Example :
MyString = format["Target Name/Pos: %1, %2", EnemyUnit, getpos EnemyUnit]

Note :
This is similar to how printf works in the C language


Command : 
FormLeader

Description : 
??

Syntax :
??.

Returns :
??

Example :
??


Command : 
GetDammage

Description : 
Used to find how much damage a unit has taken.

Syntax :
GetDammage
UnitName

UnitName is the name of the unit who's status you want to check. 

Returns :
A number between 0 and 1

0 - Unit is undamaged
1 - Unit is dead

Example :
?(GetDammage MyGuy > .5):MyGuy SideChat "I don't think I'm gonna make it."


Command : 
GetDir

Description : 
Used to find what direction a unit is facing.

Syntax :
GetDir
UnitName

UnitName is the name of a unit 

Returns :
A number between 0 and 360.

0=North
90=East
180=South
270=West

Example :
MyDir = GetDir MyGuy

 

Command : 
GetMarkerPos

Description : 
Used to find the position of a marker.

Syntax :
GetMarkerPos
MarkerName

UnitName is the name of a unit

Returns :
An array containing the X,Y,Z coords of the marker.

Example :
MyCoords = GetMarkerPos MyMarker


Command : 
GetPos

Description : 
Used to find the position of a unit.

Syntax :
GetPos
UnitName

UnitName is the name of a unit

Returns :
An array containing the X,Y,Z coords of the unit.

Example :
MyCoords = GetPos MyGuy


Command : 
GlobalChat

Description : 
Causes a unit to send a message to all units in the game.

Syntax :
UnitName GlobalChat Message

UnitName is the name of a unit.
Message is a string that you want unit to chat. 

Returns :
N/A

Example:
MyIdiot GlobalChat "I'm the King of the World!"
MyGuy GlobalChat MyString


Command : 
GlobalRadio

Description : 
Allows a unit to say something over the radio. It will be received by all units in the game.

Syntax :
unitName GlobalRadio "CfgRadioClass"

unitName is the name of the unit to do the talking.
CfgRadioClass is the name of a CfgRadio class that you define in your mission's description.ext file. 

Returns :
N/A

Example :
off GlobalRadio "RFallback"; 

Notes:
For more information on how to use this radio command refer to the tutorials at the
OFP Editing Center website.


Command : 
Goto

Description : 
Used in scripts to cause script execution to jump somewhere.

Syntax :
Goto
"Label"

Label is a label somewhere in the script that script execution should continue at. The label must start with #, but do not include the # in the goto statement.

Returns :
N/A

Example :
#MyStart
do whatever...
GoTo "MyStart


Command : 
Group

Description : 
Used to find out what group a unit is in.

Syntax :
Group
UnitName

UnitName is the name of a unit. 

Returns :
The Group ID that the unit is in.

Example :
MyGroup = group MyGuy


Command : 
GroupChat

Description : 
Causes a unit to chat to all units in his group.

Syntax :
UnitName GroupChat Message

UnitName is the name of the unit who should chat.
Message is the string you want him to chat. 

Returns :
N/A

Example :
MyGuy GroupChat "Hmmm, I seem to be lost"
MyGuy GroupChat MyHappySong


Command : 
GrpNull

Description : 
Returns a null group.

Syntax :
GrpNull

Returns :
A null Group ID. 

Example :
MyGuy Join GrpNull 

Notes:
Usefull for removing a member from an existing group


Command : 
Gunner

Description : 
Returns the gunner of the specified vehicle

Syntax :
gunner
UnitName

UnitName is the name of the vehicle

Returns :
The identifier for the unit gunner for UnitName

Example :
(gunner myTank) globalchat "Out of ammo sir!"


Command : 
HandsHit

Description : 
Determines if a units hands have been hit.

Syntax :
HandHit
UnitName

UnitName is the name of a unit

Returns :
0 or 1

1 if units hands/arms have been hit
0 if units hands/arms have not been hit

Example :
?(HandsHit MyGuy == 1):MyGuy sidechat "Can't aim, think my arm's broke!"


Command : 
HasWeapon

Description : 
Indicates whether or not a unit is carrying a specific weapon type.

Syntax :
unitName hasWeapon  "weaponName"

unitName is the name of the unit to check
weaponName is the name of the weapon (need to have quotes!). For a list of weapons refer to the Weapon/Ammo List

Returns :
TorF

true indicates the unit has that weapon type
false indicates the unit does not have that weapon type

Example :
?(MyGuy hasWeapon  "M16"):MyGuy sidechat "I've got an M16!" 


Command : 
Hint

Description : 
Display text in the upper left hint window during game play. Always uses a pling sound.

Syntax :
Hint
  text 

text is the text to display

Returns :
N/A

Example :
Hint "Move to the next waypoint!"

*** Notes:
You can have multiple lines by inserting newline characters (\n) into the string.

Can also be used in conjuction with the command "Format" :
Hint format ["Alpha team has : %1 minutes left",_alphacountdown]


Command : 
Hintc

Description : 
Halts the game and displays a text centered on the screen, untill player presses a key. Always uses a pling sound.

Syntax :
Hintc
  text 

text is the text to display

Returns :
N/A

Example :
Hintc "Remember that you need to rescue the captives !" 

*** Notes:
You can have multiple lines by inserting newline characters (\n) into the string.

Can also be used in conjuction with the command "Format" :
Hintc format ["Alphateam has %1 members left.",_alphateam]


Command : 
HintCadet

Description : 
Display text in the upper left hint window, only in Cadet (easy) mode. Always uses a pling sound.

Syntax :
Hintc
  text 

text is the text to display

Returns :
N/A

Example :
HintCadet "Do you even get lost in training, private ?" 

*** Notes:
You can have multiple lines by inserting newline characters (\n) into the string.

Can also be used in conjuction with the command "Format" :
HintCadet format ["You have %1 one clips left, don't play Rambo!",_clipsleft]


Command : 
In

Description : 
Determines if selected value is in an array. Can also be used to determine if a unit is in a vehicle.

Syntax 1:

Value in Array

Value can be of any datatype, i.e. number, string, unit, etc.
Array is the array to search for value

Syntax 2:

UnitName in VehicleName

UnitName is a name of a unit
Vehicle is the name of a unit

Returns :
True or False

True - Value is in array or vehicle
False - Value is not in array or vehicle

Example :
aP in thislist
20 in arrayofnumbers
myGuy in myJeep


Command : 
InFlame

Description : 
Starts or puts out a fire object.

Syntax :
Firename InFlame TorF

Firename is the name of the fireobject

TorF is the value TRUE or FALSE

TRUE - Will start the fire
FALSE - will put out the object
 

Returns :
N/A

Example:
this InFlame true
MyFire InFlame false


Command : 
inflamed

Description : 
Tells you whether an object is on fire or not..

Syntax : 
booleanval=inflamed fireobjectname

Returns :
T or F

Example :
inflamed fire1


Command : 
IsNull

Description : 
Indicates whether or not a specified unit is Null

Syntax :
IsNull
unitName

unitName is the name of the unit to check 

Returns :
true or false

Example :
IsNull unitA


Command : 
Join

Description : 
Causes selected unit to join specified group.

Syntax :
UnitName Join GroupName

UnitName is the name of the unit to join a group.
GroupName is the group the unit should join. Use GrpNull to take a unit out of a group. 

Returns :
N/A

Example :
MyGuy Join BigGroup
MyGuy Join GrpNull
MyGuy Join group OtherGuy


Command : 
KnowsAbout

Description : 
Tells how much one unit knows about another.

Syntax :
Unit1 KnowsAbout Unit2

Unit1 is the name of a unit
Unit2 is the name of another unit 

Returns :
Value between 0 and 4.

0 means Unit1 does not know about Unit2
4 means Unit1 knows exactly where Unit2 is, and what he is.

This value will decrease over time and distance. Will also lower if unit1 is not in view of unit 2 (i.e. behind bushes).  

Example :
?(MyEnemy KnowsAbout MyGuy > 2): exec "soundalarm.sqs"

Notes :
Units will not fire at an enemy unit if the knowsabout value is 1 or less. 


Command : 
Land

Description : 
Used to make an aircraft land.

Syntax :
UnitName Land "land"

Are there other strings besides land ?
UnitName is the name of the aircraft you want to land. 

Returns :
N/A

Example :
MyHeli Land "land"

Notes :
Helicopter units will land near an  "H" empty object if it is there.


Command : 
Leader

Description : 
Used to find out who the leader of a unit is.

Syntax :
Leader
UnitName

Unitname is the name of the unit who's leader you want to find..

Returns :
Unit ID of the leader of UnitName

Example :
LeaderGuy = leader MyGuy


Command : 
LeaveVehicle

Description : 
Causes leader of a group to order group to disembark. Will not cause them to eject. If player is leader, will not cause him to issue order.

Syntax :
GroupName LeaveVehicle VehicleName

GroupName is the name of the group to leave the vehicle. You may use a unit name here, but it will still cause all members of the units group to disembark.

VehicleName the name of the vehicle to exit. 

Returns :
N/A

Example :
group MyGuy LeaveVehicle vehicle Myguy

Notes:
It you are in a group (not leader) that is ordered to disembark, you will not be able to re-enter vehicle. Odd effect. If you order a group to leave a vehicle that they are not in, the occupants of the vehicle specified will exit the vehicle, then re-enter it. 

 

Command : 
Light

Description : 
???

Syntax :
???

Returns :
??? 

Example :
??? 

 

Command : 
List

Description : 
Returns a list of elements in an array.

Syntax :
List
Array

Array
is the array you want to have as a list 

Returns :
The list of elements in an array 

Example :
MyArray = ["rocketlauncher","tea",3,5] 
NewArray = List MyArray

or if you want to convert the elements in a trigger to an array:

MyTriggerList = list NameOfMyTrigger

Note :
Do not confuse list with
thislist, they are different. 


Command : 
Local

Description : 
??

Syntax :
??

Returns :
??

Example :
??


Command : 
Localize

Description : 
Will retrieve the appropriate text string for a specified string identifier. This command takes into account the language in which Operation Flashpoint is running. String Identifiers and their associated strings in the various languages are defined in the mission s stringtable.csv file.

Syntax :
Localize
 StringIdentifier 

StringIdentifier is the string identifier. It is stored in the first column in the stringtable.csv file.  

Returns :
A text string

Example :
aP globalchat localize  STR_SAYHELLO 

Might return hello in English or Bonjour in French.

Notes:
It's a good idea to use this method wherever you use a string in your missions. This will ensure your mission can run in different languages. The downside is it takes work to translate all of your strings into different languages. 

 

Command : 
Lock

Description : 
Allows /disallows the specified unit from entering a vehicle.

Syntax :
VehicleName Lock TorF

VehicleName is the name of the vehicle to lock

TorF 
TRUE locks the vehicle
FALSE  unlocks the vehicle

Returns :
N/A

Example :
MySportsCarUnit Lock True


Command : 
LockWP

Description : 
Allows /disallows the specified unit from moving to it s next waypoint.

Syntax :
unitName LockWP TorF

unitName is the name of the unit to move

TorF 
TRUE locks the waypoint so the unit will not move to it.
FALSE  unlocks the waypoint so the unit will move to it.
 

Returns :
N/A

Example :
aP LockWP false


Command : 
MoveInCargo

Description : 
Instantly moves a unit into the cargo in a specified vehicle.

Syntax :
UnitName MoveInCargo VehicleName

unitName is the name of the unit to move
vehicleName is the name fhe unit to move into 

Returns :
N/A

Example:
aP MoveInCargo MyTank

Notes :
Use the AssignAsCargo and the Ordergetin TRUE command to let the unit walk to the unit and get in, this command teleports the unit into the vehicle.


Command : 
MoveInCommander

Description : 
Instantly moves a unit into the commander position in a specified vehicle.

Syntax :
UnitName MoveInCommander VehicleName

unitName is the name of the unit to move
vehicleName is the name fhe unit to move into

Returns :
N/A

Example:
aP MoveInCommander MyTank

Notes :
Use the AssignAsCommander and the Ordergetin TRUE command to let the unit walk to the unit and get in, this command teleports the unit into the vehicle.


Command : 
MoveInDriver

Description : 
Instantly moves a unit into the driver position in a specified vehicle.

Syntax :
UnitName moveindriver VehicleName

unitName is the name of the unit to move
vehicleName is the name fhe unit to move into

Returns :
N/A

Example :
aP MoveInDriver MyTank

Notes :
Use the AssignAsDriver and the Ordergetin TRUE command to let the unit walk to the unit and get in, this command teleports the unit into the vehicle.


Command : 
MoveInGunner

Description : 
Instantly moves a unit into the gunner position in a specified vehicle.

Syntax :
UnitName moveingunner VehicleName

unitName is the name of the unit to move
vehicleName is the name fhe unit to move into

Returns :
N/A

Example :
aP MoveInGunner MyTank

Notes :
Use the AssignAsGunner and the Ordergetin TRUE command to let the unit walk to the unit and get in, this command teleports the unit into the vehicle.


Command : 
Name

Description :
??? 

Syntax :
???

Returns :
???

Example :
???


Command : 
NearestBuilding

Description : 
Used to find the building nearest a unit.

Syntax :
NearestBuilding
UnitName

UnitName is the name of a unit. 

Returns :
A building identifier for the building nearest the unit.

Example:
TargetBuilding = NearestBuilding MyGuy


Command : 
NearestObject

Description :
Returns the nearest object to the given position. Pretty useful for tons of things. This way you can get positions from and references to almost anything in the game. (Except for markers and triggers it really returns about anything) This includes height-lines on the player's map as well as borders to neighbouring sectors. On the more usefull side it returns trees, busches, houses, Units, Grenades (Did not test for Bullets), Roads and lots of other stuff.  

Syntax :
NearestObject [x,y,z]

Returns :
An Object

Example :
_near = NearestObject [5400,5321,3]

 

Command : 
NextWaypoint

Description :
??? 

Syntax :
???

Returns :
???

Example :
???


Command : 
ObjNull

Description : 
This is more of a keyword than a command. Basically this signifies no unit. You can use this in place of unitName for many commands. For example, instead of _sniper DoFire _enemy you might instead have _sniper DoFire objNull to signify no firing.

Syntax :
ObjNull

Returns :
Null unit identifier 

Example :
_sniper doFire objNull
_myflag SetFlagOwner objNull


Command : 
ObjStatus

Description : 
Sets the status of a mission objective

Syntax :
objectiveNumber  ObjStatus  objectiveStatus 

objectiveNumber is the number of the objective to modify. Quotes are necessary. 

objectiveStatus the status to set. Quotes are necessary. Valid values are :
"DONE" - Will mark the objective as done in the mission warrent.
"FAILED" - Mark the objective as failed in the mission warrant.
"HIDDEN" - Objective won't appear in the mission warrant &nbsp.
"ACTIVE" - Objective which has been hidden will now appear in the mission warrant &nbsp.

Returns :
N/A

Example:
"0" objstatus "DONE"

Notes :
Objectives are defined in the briefing.html file, for more info on how to work with objectives, check out the OFP editing center.


Command : 
Or (also II)

Description : 
Logical operator to return true if one or both of two expressions is true

Syntax :
expression1 or expression2

expression1 is the first expression to check. It must be able to return a true/false value.
expression2 is the second expression to check. It must be able to return a true/false value. 

Returns :
true if either expression is true
false if both expressions are false

Example :
? (mycounter == 0) or (not alive myUnit) : aP globalchat "Ahhhh too bad!" 

Notes:
You can also have multiple or commands in your expression. For example :
?(mycounter ==0) or (alive myUnit) or (checkflag) : aP globalchat "You made it!" 
You can also use || as well instead of or. 
 


Command : 
OrderGetIn

Description : 
Orders a unit to get into it s assigned vehicle.

Syntax :
unitNameArray OrderGetIn true

unitNameArray is an array of Unit names you want to order to get into their assigned vehicles. 

Returns :
N/A

Example :
[homer,marge,bart,lisa,maggie] ordergetin true

Notes:
Before you can do this you must first assign the units to vehicles using one of the assign commands. 


Command : 
Position

Description : 
?? I did not see this command in any of the official missions or campaign

Syntax :
??

Returns :
??

Example:
??


Command : 
PlayMove

Description : 
Tells a unit to play a character animation.

Syntax :
unitName playmove "animation"

unitName is the name of the unit to modify animation is the character animation to change to. See the Character Animations of possible animations. 

Returns :
N/A

Example :
aP playmove "EffectStandSitDown"


Command : 
PlayMusic

Description : 
Plays a music soundtrack

Syntax :
PlayMusic 
"CfgMusicClass"

CfgMusicClass is the name of a CfgMusic class that you define in your mission's description.ext file.

Returns :
N/A

Example :
playMusic "HellsBells"; 

Notes:
For more information on how to use this command refer to the tutorials at the OFP Editing Center website.


Command : 
PlaySound

Description : 
Plays a sound

Syntax :
PlaySound
"CfgSoundsClass"

CfgSoundsClass is the name of a CfgSounds class that you define in your mission's description.ext file. 

Returns :
N/A

Example :
playSound "ScreamingPeople"; 

Notes:
For more information on how to use this command refer to the tutorials at the OFP Editing Center website.


Command : 
PublicVariable (! Untested)

Description : 
Distributes a variable accross a network game.

Syntax :
PublicVariable "variable"

Variable is the value you want to have in a network. Place it in a "init.sqs" script (see the command Exec for more info on that)

Returns :
N/A

Example :
PublicVariable "_WestDeathScore"


Command : 
Random

Description : 
Returns a random number

Syntax :
random
maxNumber

maxNumber is the maximum value to choose from.

Returns :
Random floating number value between 0 and maxNumber

Example:
Random 10


Command : 
Rating

Description : 
Returns the rating of a unit in the game. Used for scoring.

Syntax :
rating
unitName

unitName is the name of the unit  

Returns :
Integer value of that person's rating.

Example:
Rating homerSimpson

Notes :
Use the Addrating command to set the rating of a unit.


Command : 
RemoveAction

Description : 
Removes an action from a units action menu.

Syntax : 
=unit removeaction actionid
 
action id the the name assigned to the action using the addaction command.
You do not need to assign an id to your action, but it is a useful way of remembering what each one is!
You can remove the first action you created using unit removeaction 0 the second by changing the 0 to a 1 etc...

Returns :
-

Example :
player removeaction attack


Command : 
RemoveAllWeapons

Description : 
Remove all of the weapons from a unit.

Syntax :
RemoveAllWeapons
unitName

unitName is the name of the unit

Returns :
N/A

Example :
aP RemoveAllWeapons


Command : 
RemoveMagazine

Description : 
Remove a single magazine of a specific type from a specified unit's supply

Syntax :
unitName removeMagazine  magazineName 

unitName is the name of the unit
magazineName is the name of the magazine (need to have quotes!). For a list of ammo magazines refer to the
Weapons List

Returns :
N/A

Example :
aP RemoveMagazine "M16"


Command : 
RemoveMagazines

Description : 
Remove all of the magazines of a specific type from a specified unit's supply

Syntax :
unitName removeMagazines magazineName 

unitName is the name of the unit
magazineName is the name of the magazines (need to have quotes!). For a list of ammo magazines refer to the
Weapons List

Returns :
N/A

Example:
aP RemoveMagazines "M16"


Command : 
RemoveWeapon

Description : 
Remove a specific weapon from a specified unit s supply

Syntax :
unitName removeWeapon  WeaponName 

unitName is the name of the unit
weaponName is the name of the weapon (need to have quotes!). For a list of weapons refer to the Weapons List 

Returns :
N/A

Example:
aP RemoveWeapon "Binocular"


Command : 
Reveal

Description : 
Causes a unit to reveal the location of another unit. If the revealing unit is in the players squad then the player will see a target indicator appear where the revealed unit is located. If the revealed unit and the revealer unit are within range then the revealer will open fire.

Syntax :
revealerUnitName reveal revealedUnitName

revealerUnitName is the name of the unit that is revealing another unit
revealedUnitName is the name of the unit that is being revealed 

Returns :
N/A

Example:
Westunit1 reveal Eastunit2


Command : 
SaveGame

Description : 
Force an autosave in the game. Good to do this in long missions so the player does not have to replay the entire mission if he/she dies.

Syntax :
savegame

Returns :
N/A

Example:
savegame


Command : 
SaveVar

Description : 
Allows you to save variables from one mission to the next mission in a campaign.

Syntax :
SaveVar 
variablename

Variablename is the name of the variable to save. It is necessary to enclose it in quotes. 

Returns :
N/A

Example:
SaveVar  "houseDestroyedFlag" 

Notes:
It is not necessary to load a variable in the next mission. It is automatically loaded.


Command : 
Say

Description : 
Allows a unit to say something. 

Syntax :
unitName Say "CfgSoundClass"

unitName is the name of the unit to do the talking.
CfgSoundClass is the name of a CfgSound class that you define in your mission's description.ext file. 

Returns :
N/A

Example:
unit1 say "Fallback";

Notes:
For more information on how to use this command refer to the tutorials section at the OFP Editing Center website. 

 

Command : 
Score

Description : 
Returns the score of a unit 

Syntax :
Score
UnitName

Unitname
is the unit you want to know the score of

Returns :
Returns the score of a unit

Example:
Totalscore = score MyPlayer


Command : 
Select

Description : 
Selects an element of an array 

Syntax :
arrayName Select elementNum

arrayName is the name of the array.
elementNum is the number of the element to return. Array indexes start at 1 not 0. 

Returns :
The value of the array element

Example:
myY = myCoords select 1
currUnit = myFavoriteUnits select 2


Command : 
SetAccTime

Description : 
Sets the time acceleration factor.

Syntax :
SetAccTime
AccelerationFactor

AcclerationFactor is the speed you want time to move at. 
4 would be 4x normal speed.
.1 would be 1/10 normal speed.
 

Returns :
N/A

Example :
SetAccTime 1.0


Command : 
SetAmmoCargo

Description : 
Sets the amount of ammo in the cargo of a vehicle (e.g. truck)

Syntax :
Unitname SetAmmoCargo ["ammotype",number]

Unitname 
is the vehicle to add ammo to.
ammotype
the type of ammo to be used. (Check out the Weaponslist for reference)
number
is the number of ammo to be used (Any Limit to this?)

Returns :
N/A

Example :
MyTruck SetAmmoCargo ["AT4Launcher",4]


Command : 
SetBehaviour

Description : 
Sets the combat behaviour of a unit

Syntax :
UnitName SetBehaviour "Type"

UnitName is the name of the vehicle whose behaviour should change.

Type is the behaviour type :

"SAFE"=Secure. Everything okay. Gun on back. Makes vehicledriver use roads. 
"AWARE"=stay alert,go prone when you are prone, won't automatically go to cover
"COMBAT"=uses lots of Prone and Sprinting to Advance
"CARELESS"=Don't give a shit. Don't react even if grenade lands near them.
"STEALTH"=unit will use cover, prone movement to advance. 

Returns :
N/A

Example:
Kramer SetBehaviour "CARELESS"


Command : 
SetCaptive

Description : 
Sets whether a unit is a captive or not. When a captive the enemy will not fire at the unit. Be careful though. If the unit has any weapons it will still fire on the enemy.

Syntax :
UnitName SetCaptive TorF

UnitName is the name of the unit to modify
TorF is either true or false. True to make a captive. False to not make a captive. 

Returns :
N/A

Example :
Kramer SetCaptive true


Command : 
SetCombatMode

Description : 
Sets the combat mode of a unit. .

Syntax :
UnitName SetCombatMode "Mode"

UnitName is the name of the unit to modify

Mode is the combat mode :
"BLUE"=Never Fire
"GREEN"=Hold Fire
"WHITE"=Hold Fire, Engage At Will
"YELLOW"=Open Fire (stay where you are at)
"RED"=Open Fire, Engage At Will (seek targets but stay near leader)

Note :
When you want guards to fire when an enemy comes close to them, use White or Red combatmodes. 

Returns :
N/A

Example :
Kramer SetCombatMode "RED"


Command : 
SetDammage

Description : 
Sets the damage level of a unit.

Syntax :
UnitName SetDammage Level

UnitName is the name of the unit to modify

Level is a numeric value indicating damage level. 0.0 - 1.0 where 0 is not damaged and 1.0 destroyed. Note : You can set the damage of a destroyed unit back to 0. This trick  allows us to reuse vehicles to generate explosions repeatedly.

Returns :
N/A

Example:
Kramer SetDammage 0.5


Command : 
SetDir

Description : 
Sets the direction a unit is facing.

Syntax :
UnitName
SetDir Direction

UnitName is the name of the unit to modify
Direction is a direction to face. 0 - 359 where 0 is north, 90 is east, 180 is south, and 270  is west. 

Returns :
N/A

Example :
Kramer SetDir 90


Command : 
SetFace

Description : 
Changes the face of a soldier

Syntax :
UnitName
SetFace "FaceName"

UnitName is the name of the soldier whose face should change
FaceName is the name of the face. Check out the Game Face List to see what facename's are avaible. These are the same as the faces you find in the user settings of the game.

Returns :
N/A

Example:
Kramer SetFace "face10"


Command : 
SetFaceAnimation

Description : 
Not sure. Did not see this in any of the official missions or campaign. Was this replaced by the setmimic command?

Syntax :
??

Returns :
??

Example:
??


Command : 
SetFlagOwner

Description : 
Changes the owner of the flag. In the official MP missions this is used to set a flag to ObjNull to indicate nobody owns the flag anymore. Only used in Multiplayer.

Syntax :
UnitName
SetFlagOwner "Owner"

UnitName is the name of the flag vehicle to modify.
Owner is the new owner of the flag : "objNull" indicates no one owns the flag 

Returns :
N/A

Example:
usaFlag setFlagOwner "objNull"


Command : 
SetFlagSide

Description : 
Changes which side the flag belongs to. Only used in Multiplayer.

Syntax :
UnitName
SetFlagSide Side

UnitName is the name of the flag vehicle to modify.
Side is the new side of the flag :
EAST indicates the eastern forces own it
WEST indicates the western forces own it
 

Returns :
N/A

Example:
usaFlag setFlagSide east


Command : 
SetFlagTexture

Description : 
Changes the flag texture for a flag.

Syntax :
UnitName
SetFlagTexture "Texture"

UnitName is the name of the flag vehicle to modify.
Texture is the new texture to use :

usa_vlajka.pac - American Flag
west_vlajka.pac - NATO Flag
rus_vlajka.pac - Soviet Flag 
a custom texture, see notes below.

Returns :
N/A

Example:
MyFlagObject setFlagTexture "pirateflag.jpg"

Notes:
You can also use your own flagtexture, use a non-progressive JPG image (most image programs save "normal" jpg files as default) Make sure it's size is 128x256 pixels, and be sure to place the file in the mission directory your editing. 


Command : 
SetFog

Description : 
Changes the fog in the mission.

Syntax :
transitionTime
SetFog fogValue

transitionTime is the amount of time (in seconds) for the transition to the new weather takes.
fogValue indicates the fog amount. Value can be between 0.0 and 1.0 where 0.0 is clear skys and 1.0 is complete fog.

Returns :
N/A

Example:
20 SetFog 0.8


Command : 
SetFormation

Description : 
Changes the formation of a group

Syntax :
groupName
SetFormation formation 

groupName is the name of the group. This name is set in one of the group's units. Initialization fields with the  "group this" command.
Formation is the formation to change to. Valid values are :

"LINE"=Line formation 
"STAG COLUMN"=Staggered column formation
"WEDGE"=wedge formation
"ECH LEFT"=echelon left
"ECH RIGHT"=echelon right
"VEE"=vee formation
"COLUMN" =column formation

Returns :
N/A

Example :
MyGrp SetFormation "VEE"


Command : 
SetFormDir

Description : 
Changes the direction of a group

Syntax :
groupName
SetFormDir direction

groupName is the name of the group. This name is set in one of the group s units Initialization fields with the  "group this"  command.
direction is the direction to face. 0-359 where 0 is north, 90 is east, 180 is south, and 270 is west.  

Returns :
N/A

Example:
MyGrp SetFormdir 90
MyGrp SetFormdir _enemyattackvector


Command : 
SetFuel

Description : 
Sets the amount of fuel in a vehicle.

Syntax :
UnitName
SetFuel Amount

UnitName is the name of the vehicle.
Amount is a percentage 0.0 to 1.0 where 0.0 indicates empty and 1.0 indicates full. 

Returns :
N/A

Example :
myTruck SetFuel 0.5


Command : 
SetFuelCargo

Description : 
??Does this set the amount of refuel for  a refuel vehicle

Syntax :
SetFuelCargo Number

Number ???

Returns :
N/A

Example :
?


Command : 
SetGroupID

Description : 
Allows you to modify the group callsign and color which is used to distinguish the group when a vehicle in that group uses the sidechat command. 

Syntax :
groupName
SetGroupID ["CallSign","Color"]

groupName is the name of the group.
CallSign is the call sign to use for this group. Valid values are :
"Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel"

Color is the group color. Valid values are :
"GroupColor1" = Black
"GroupColor2" = Red
"GroupColor3" = Green
"GroupColor4" = Blue
"GroupColor5" = Yellow
"GroupColor6" = Orange
"GroupColor7" = Pink  
 

Returns :
N/A

Example :
mygrp SetGroupID ["Alpha","GroupColor5"]


Command : 
SetIdentity

Description : 
Sets an identity defined in the description.ext file to the specified unit. Identities are used for characters in the mission who will be using the say and radioMsg commands. Refer to the tutorials at  the OFP Editing Center website for more information on using identities.

Syntax :
unitName SetIdentity "identityName"

unitName is the name of the unit to assign the identity
identityName is the name of the CfgIdentity class in the description.ext file. 

Returns :
N/A

Example :
myUnit SetIdentity "Tony"


Command : 
SetMarkerPos

Description : 
Moves the specified marker to a new map location

Syntax :
markerName
SetMarkerPos [X,Y,Z] 

markerName is the name of the marker.

X is the x coordinate for the new location
Y is the y coordinate for the new location
Z is the z coordinate for the new location 

Returns :
N/A

Example :
attackMarker SetMarkerPos [2000,3000,0]


Command : 
SetMarkerType

Description : 
Changes the icon for the specified marker.

Syntax :
markerName
SetMarkerType "markerType"

markerName is the name of the marker.
markerType is the type of marker. Valid values are :

"Start" =Arrow moving out of a circle
"End"= Circle with an arrow going into it from the top
"Pickup"= Arrow bouncing in and out of a circle
"Empty" = Circle with a diagonal line through it
"Marker"= X icon
"Destroy"= Targetting icon
"Arrow" = Arrow
"Flag1" = Flag icon
"Warning"=Exclamation Mark
"Dot"=Simple little dot. Can use these to denote movement paths
"Join"=Two Arrows joining in a circle
"Unknown"=Question Mark

Returns :
N/A

Example :
attackMarker SetMarkerType "Destroy"


Command : 
SetMimic

Description : 
Changes the facial expression of a character.

Syntax :
unitName
SetMimic "mimicType"

unitName is the name of the unit to modify.
mimicType is the type of facial expression. Valid values are :

"angry" - Angry look
"smile" - Happy look
"suprise" - Suprised look
"hurt" - Hurt look
"sad" - Sad look
"ironic" - Ironic look
"cynic" - Cynical look
"agresive" - Aggresive look (NOTE: The spelling is correct ) 
"normal" - Normal look 
 

Returns :
N/A

Example :
unitBruceWillis SetMimic "angry"

 

Command : 
SetOvercast

Description : 
Changes the weather in the mission

Syntax :
transitionTime
SetOvercast overcastValue

transitionTime is the amount of time (in seconds) for the transition to the new weather takes. 

overCastValue indicates the weather. Value can be between 0.0 and 1.0 where 0.0 is clear skys and 1.0 is complete overcast.

Returns :
N/A

Example :
20 SetOverCast 0.8


Command : 
SetPos

Description : 
Instantly changes the position of the specified unit on the map. Note that the Z coordinate really works here.

Syntax :
unitName
SetPos [X,Y,Z]

unitName is the name of the unit to move.

X is the x coordinate for the new location
Y is the y coordinate for the new location
Z is the z coordinate for the new location. 

Returns :
N/A

Example :
myUnit SetPos [3000,2000,0]


Command : 
SetRadioMsg

Description : 
Changes the text of a radio command in the radio menu. 

Note : To use a radio command you should also create a trigger with the appropriate Radio channel (Alpha - Hotel)

Syntax :
channelNumber
SetRadioMsg "Text"

channelNumber is the number of the channel you want to change. The valid values are :

1 = Alpha radio channel
2 = Bravo radio channel
3 = Charlie radio channel
4 = Delta radio channel
5 = Echo radio channel
6 = Foxtrot radio channel
7 = Golf radio channel
8 = Hotel radio channel

Text is the text you want to change it to. 

Note : A string value "null" will cause the radio channel to not show in the radio menu.  

Returns :
N/A

Example :
1 SetRadioMsg "Call in Air Strike"


Command : 
SetRepairCargo

Description : 
??

Syntax :
SetFuelCargo Number

Number ???

Returns :
N/A

Example :
??


Command : 
SetSpeedMode

Description : 
Changes the speed of the specified unit.

Syntax :
unitName
SetSpeedMode "speed"

unitName is the name of the unit to move.
speed is the speed to change to. Valid values are :

"FULL"=full speed ahead
"NORMAL"=normal speed
"LIMITED"=Slow speed 

Returns :
N/A

Example :
MyTank SetSpeed "FULL"


Command : 
SetUnitPos

Description : 
Changes the prone position of the specified unit.

Syntax :
unitName
SetUnitPos "position"

unitName is the name of the unit to modify.

position is the position the unit should take. Valid values are :

"DOWN"=get down
"UP"=stand up
"AUTO"=let the unit decide best stance 

Returns :
N/A

Example :
unitGrunt1 SetUnitPos "DOWN"


Command : 
SetViewDistance

Description : 
Changes the maximum viewing distance the player can see on screen. Keep in mind that the CPU requirements increase when you increase the distance due to the fact that more objects need to be drawn on screen.

Syntax :
SetViewDistance distance

distance is the distance in meters

Returns :
N/A

Example :
setViewDistance 2000


Command : 
ShowCinemaBorder

Description : 
Enables/disables the black border at the top and bottom of the screen (letterbox) when  the camera view is not from the player's perspective. One example is you can use this in the On Activation field of a trigger which is using a camera effect at that waypoint.

Syntax :
ShowCinemaBorder TorF

TorF can be either true or false

Returns :
N/A

Example :
ShowCinemaBorder False


Command : 
ShowCompass

Description : 
Indicates whether or not the compass will be available in the mission.

NOTE : This command should be added only to the description.ext file. Also, this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShowCompass = value

value can be 0 to not show or 1 to show

Returns :
N/A

Example :
ShowCompass = 1


Command : 
ShowGPS

Description : 
Indicates whether or not the global positioning system (GPS) will be available in the mission.

NOTE : This command should be added only to the description.ext file.Also, this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShowGPS = value

value can be 0 to not show or 1 to show 

Returns :
N/A

Example :
ShowGPS = 0


Command : 
ShowMap

Description : 
Indicates whether or not the map will be available in the mission.

NOTE : This command should be added only to the description.ext file. Also, this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShowMap = value

value can be 0 to not show or 1 to show 

Returns :
N/A

Example :
ShowMap = 0


Command : 
ShownCompass

Description : 
Indicates whether the compass is available in the mission.

Note : this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShownCompass

Returns :
true or false

Example :
ShownCompass


Command : 
ShownGPS

Description : 
Indicates whether the Global Positioning System (GPS) is available in the mission.

Note : this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShownGPS

Returns :
true or false

Example :
ShownGPS


Command : 
ShownMap

Description :
Indicates whether the Map is available in the mission.

Note : this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShownMap

Returns :
true or false

Example :
ShownMap


Command : 
ShownPad

Description :
Indicates whether the Notepad is available in the mission.

Note : this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShownPad

Returns :
true or false

Example :
ShownPad


Command : 
ShownRadio

Description :
Indicates whether the Radio is available in the mission.

Note : this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShownRadio

Returns :
true or false

Example :
ShownRadio


Command : 
ShownWarrent

Description :
Indicates whether the Warrent is available in the mission.

Note : this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShownWarrent

Returns :
true or false

Example :
ShownWarrent


Command : 
ShownWatch

Description :
Indicates whether the Watch is available in the mission.

Note : this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShownWatch

Returns :
true or false

Example :
ShownWatch


Command : 
ShowNotepad

Description :
Indicates whether or not the notepad will be available in the mission.

NOTE : This command should be added only to the description.ext file. Also, this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShowNotepad = value

value can be 0 to not show or 1 to show

Returns :
true or false

Example :
ShowNotepad = 0


Command : 
ShowRadio

Description :
Indicates whether or not the radio will be available in the mission.

NOTE : This command should be added only to the description.ext file.Also, this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShowRadio = value

value can be 0 to not show or 1 to show

Returns :
true or false

Example :
ShowRadio = 0


Command : 
ShowWarrent

Description :
Indicates whether or not the warrent will be available in the mission.

Didn't see this used in any of the official missions or campaign.

NOTE : This command should be added only to the description.ext file. Also, this feature is not testable in the Mission Builder. You need to run the mission from  OFP to see the effect

Syntax :
ShowWarrent = value

value can be 0 to not show or 1 to show

Returns :
true or false

Example :
ShowWarrent = 1


Command : 
ShowWatch

Description :
Indicates whether or not the watch will be available in the mission.

NOTE : This command should be added only to the description.ext file. Also, this feature is not testable in the Mission Builder. You need to run the mission from OFP to see the effect.

Syntax :
ShowWatch = value

value can be 0 to not show or 1 to show

Returns :
N/A

Example :
ShowWatch = 0


Command : 
Side

Description :
Returns the side of the specified unit.

Syntax :
side unitName

unitName is the name of the unit to check 

Returns :
east
west
guer
civ

Example :
?side player == east : player globalchat "Don't shoot ! I am soviet!"


Command : 
SideChat

Description :
Returns the side of the specified unit.

Syntax :
unitName
SideChat "Text"

unitName is the name of the unit to do the chatting.
Text is the text string to display 

Returns :
N/A

Example :
myUnit sideChat "Alpha black one to PapaBear : My mother is killing me"


Command : 
SideRadio

Description :
Allows a unit to say something over the radio. All units on the same side of the speaker will receive this radio.

Syntax :
unitName
SideRadio "CfgRadioClass"

unitName is the name of the unit to do the talking.
CfgRadioClass is the name of a CfgRadio class that you define in your mission's description.ext file. 

Returns :
N/A

Example :
Unit1 sideRadio "RFallback"; 


Command : 
SideRadio

Description :
Allows a unit to say something over the radio. All units on the same side of the speaker will receive this radio.

Syntax :
unitName
SideRadio "CfgRadioClass"

unitName is the name of the unit to do the talking.
CfgRadioClass is the name of a CfgRadio class that you define in your mission's description.ext file.

Returns :
N/A

Example :
Unit1 sideRadio "RFallback"; 

Notes:
For more information on how to use radio commands refer to the tutorials at the OFP Editing Center website.


Command : 
Skiptime

Description :
Instantly moves the game time forward.

Syntax :
skiptime hours

hours is the number of hours to move forward. 

Returns :
N/A

Example :
skiptime 5


Command : 
SomeAmmo

Description :
Indicates whether not a unit has any ammo

Syntax :
someAmmo unitName

unitName is the name of the unit to check

Returns :
TorF

true indicates the unit has ammo
false indicates the unit has no ammo remaining.

Example :
someAmmo aP

 

Command : 
Speed

Description :
Returns the speed of the unit.

Syntax :
speed unitName

unitName is the name of the unit to return the speed

Returns :
Returns the speed of the unit.

Example :
SpeedOfUnit = speed MyTank


Command : 
SpeedMode

Description :
Returns the speedmode of the unit.

Syntax :
unitName
Speedmode "speed"

unitName is the name of the unit to return the speedmode

Returns :
"limited" = slow movement
"normal" = normal speed
"full" = full speed ahead

Example :
SpeedMode aP


Command : 
Stop

Description :
Orders a unit to either stop it's current action or resume it's previously stopped action.

Syntax :
unitName
stop TorF

unitName is the name of the unit to modify
TorF can be either true to indicate to stop or false to indicate to continue

Returns :
N/A

Example :
aP stop true

Notes:
Not sure the full scope of actions this works with. I did see it used after the setDir command. I also saw it used at the beginning of scripts to stop units and resume them at the end of the script. 


Command : 
Stopped

Description :
Indicates whether or not a unit is stopped.

Syntax :
stopped unitName

unitName is the name of the unit to check

Returns :
TorF 

true indicates the unit has stopped 
false indicates the unit is not stopped

Example :
stopped aP


Command : 
SwitchCamera

Description :
Allows you to easily change a camera from internal view to external view.

Syntax :
cameraIdentifier
switchCamera "cameraView"

cameraIdentifier is the id of the camera to change. This is a variable name which previously used as the return argument from CamCreate command.

cameraView is the type of view to change to. Valid values are :
"INTERNAL" - Camera view is from inside the camera
"EXTERNAL" - Camera view is from outside of the camera

Returns :
N/A

Example :
_mycamera SwitchCamera "EXTERNAL"


Command : 
SwitchCamera

Description :
Allows you to easily change a camera from internal view to external view.

Syntax :
cameraIdentifier
switchCamera "cameraView"

cameraIdentifier is the id of the camera to change. This is a variable name which previously used as the return argument from CamCreate command.

cameraView is the type of view to change to. Valid values are :
"INTERNAL" - Camera view is from inside the camera
"EXTERNAL" - Camera view is from outside of the camera

Returns :
N/A

Example :
_mycamera SwitchCamera "EXTERNAL"


Command : 
SwitchLight

Description :
??? I did not see this used in the official missions and campaign. If this is for switching on vehicle lights then you can use the action command instead.

Syntax :
??

Returns :
??

Example :
??


Command : 
SwitchMove

Description :
Tells a unit to instantly move to a new character animation. 

Syntax :
unitName
switchmove "animation"

unitName is the name of the unit to modify
animation is the character animation to change to. See the Character Animations List for a list of possible animations. 

Returns :
N/A

Example :
aP switchmove "EffectStandSitDown"

Note :
If you want a fluent animation, use the "playmove" command instead.


Command : 
TextLog

Description :
Tells a unit to instantly move to a new character animation. 

Syntax :
??? I did not see this used in the official missions and campaign.

Does this output game info into a log file???? I did not see this used in the official missions and campaign.

Does this output game info into a log file?

Returns :
??

Example :
??

 

Command : 
This

Description :
Used in a script to select one unit that has been passed from the mission editor. If this unit is part of a group/vehicle it will return them as well. If you want to select an array of units that was passed then use the
thislist command.

Syntax :
variable = this select number

variable
the variable you want to contain the selected unit.

select number the unit you want to select that was passed onto the script with the Exec command.

Returns :
Returns one unit

Example :
JeepVariable = this select 0

Note : 
In this example, the argument used to pass this value into the script could have looked like this :
[MyJeep, Trigger, MyGuy] exec "myscript.sqs"; 

 

Command : 
ThisList

Description :
Used in a script to select an array of
units that has been passed from the mission editor. It is not simply an array of elements as with the List command.

Syntax :
variable = thislist select number

variable
the variable you want to contain the list of units

select number the array you want to select that was passed onto the script with the Exec command

Returns :
A list of units

Example :
MyTriggerList = thislist select 0
MyTankList = thislist select 1
MyUnitList = thislist select 2

Note : 
In this example, the argument used to pass this value into the script could have looked like this :
[trigger, tank2, MyGuy] exec "myscript.sqs";

MyTriggerList would contain all the units in the trigger
MyTankList would contain all the units in the tank
MyUnitList would contain the unit(s) grouped with MyGuy
 


Command : 
Time

Description :
Indicates the amount of time in seconds since the current mission started.

Syntax :elapsedtime=time

Returns :
The time (in seconds) since the mission started.

Example :
elapsedtime=time

Command : 
TitleCut

Description :
Allows you to do a screen fade in or fade out accompanied with on screen text.

Syntax :
TitleCut ["text",fadeMethod,fadeDuration]

text is the text to display on screen
fadeMethod is the type of fade. Possible values are :

"BLACK OUT" - Fade to black screen
"BLACK IN" - Fade in from black screen
"BLACK FADED" - Similar to BLACK OUT
"BLACK" - Seemed to be same as BLACK OUT
"WHITE OUT" - Fade to white screen
"WHITE IN" - Fade in from white screen

fadeDuration is the amount of time to do fade in seconds.

Returns :
N/A

Example :
TitleCut ["Guns of Steel","BLACK IN",2.5]


Command : 
TitleObj

Description :
Puts an overlay object on the screen.

Syntax :
Textobj [ objectname , textposition ]

objectname identifies the overlay object. Valid values are :

"tvset"

There are others. Need to look them up

textPosition indicates where to display text on screen in this view mode. Possible values are :

"PLAIN DOWN" - Plain text in lower part of screen
"PLAIN" - Plain text in center of screen  
 

Returns :
N/A

Example :
Titleobj ["tvset","plain down",100]


Command : 
TitleRsc

Description :
Puts an overlay resource on the screen. 

Syntax :
titlersc [ resourcename , textposition ]

resourcename identifies the overlay resource. Valid values are :

default -   Back to normal view

binocular -   Binoculars view
creditsback 
creditsbackBIS 
creditsbackCM 
Endof 
foto - 
  Photograph border 

There are others. Need to look them up

textPosition indicates where to display text on screen in this view mode. Possible

values are :

"PLAIN DOWN" - Plain text in lower part of screen
"PLAIN" - Plain text in center of screen  
 

Returns :
N/A

Example :
titlersc ["foto","plain down"] 


Command : 
TitleText

Description :
Allows you to display text on screen.

Syntax :
TitleText ["text",textPosition]

text is the text to display on screen

textPosition indicates where to display it on screen. Possible values are :
"PLAIN DOWN" - Plain text in lower part of screen
"PLAIN" - Plain text in center of screen
 

Returns :
N/A

Example :
TitleText ["Guns of Steel","PLAIN"]

Notes:
You can add multiple lines to the screen by using "\n" in your text to denote a linefeed. For example, TitleText["Guns of Steel\nSon of a Gun","PLAIN"
 


Command : 
TitleText

Description :
Allows you to display text on screen.

Syntax :
TitleText ["text",textPosition]

text is the text to display on screen

textPosition indicates where to display it on screen. Possible values are :
"PLAIN DOWN" - Plain text in lower part of screen
"PLAIN" - Plain text in center of screen

Returns :
N/A

Example :
TitleText ["Guns of Steel","PLAIN"]

Notes:
You can add multiple lines to the screen by using "\n" in your text to denote a linefeed. For example, TitleText["Guns of Steel\nSon of a Gun","PLAIN"


Command : 
UnassignVehicle

Description :
Unassign a unit from a vehicle it was assigned to.

Syntax :
UnassignVehicle unitName 

unitName is the name of the unit to modify

Returns :
N/A

Example :
unassign aP

Notes:
If the unit is currently in the vehicle then it will exit the vehicle when this command is called.
 


Command : 
UnitReady

Description :
Indicates whether a unit has completed its last order.

Syntax :
UnitReady unitName

Returns :
TorF

true indicates the unit has completed the last order
false indicates the unit has not completed last order

Example :
UnitReady aP

Notes:
This is typically used with the wait operator (@) in scripts so that the script waits until the unit has finished its command (e.g. @UnitReady aP). In the official missions and campaign this command was used after doMove and commandMove calls. 


Command : 
Units

Description :
Used to get a list of all the units in a group.

Syntax :
Units GroupName

GroupName is the name of a group. 

Returns :
An array containing all the units in a group.

Example :
MyUnits = units group MyGuy


Command : 
Vehicle

Description :
Returns the vehicle in which the specified unit is assigned to.

Syntax :
unitName
Vehicle

Returns :
the vehicle unit the specified unit is assigned to

Example :
aP Vehicle


Command : 
VehicleChat

Description :
Transmits chat text to everyone playing inside the specified unit's vehicle. Mainly for  multiplayer missions but can be used in Single Player missions as an easy way to display text on the screen.

Syntax :
unitName
VehicleChat "Text"

unitName is the name of the unit to do the chatting.
Text is the text string to display 

Returns :
N/A 

Example :
RichArmyDude VehicleChat "I drive a mercedes with an MG"


Command : 
VehicleRadio

Description :
Allows a unit to say something over the radio. It will be received by all units within the speaker's vehicle.

Syntax :
unitName
VehicleRadio "CfgRadioClass"

unitName is the name of the unit to do the talking.
CfgRadioClass is the name of a CfgRadio class that you define in your mission's description.ext file. 

Returns :
N/A 

Example :
off VehicleRadio "RFallback"; 

Notes:
For more information on how to use this radio command refer to the tutorials at the OFP Editing Center website.



Appendix A : Object Class Tree Appendix

The following tree shows all of the object types and subtypes in the official game.  You can use these with the counttype command to determine the types of units during the mission.  For example, you might want to see if a group of soldiers still has a medic.
When you do a counttype with a object type below which is not a leaf in the tree (i.e. it has other object subtypes below it) then counttype will return if any of the subtypes are in the list you pass into the counttype command.

All

AllVehicles

Land

man

Soldier

SoldierLAW

SoldierWB

SoldierW

SoldierWG

SoldierWMortar

SoldierWMedic

SoldierWNOG

SoldierWCrew

SoldierWPilot

SoldierWMG

SoldierWLAW

SoldierWAA

SoldierWAT

SoldierWSniper

SoldierWLAWSniper

SoldierWSaboteur

SoldierWSaboteurPipe

SoldierWSaboteurDay

SoldierWMiner

OfficerW

OfficerWNight

SoldierWCaptive

SoldierEB

SoldierGFakeE

SoldierWFakeE

SoldierEG

SoldierE

SoldierEMedic

SoldierNOG

SoldierECrew

SoldierEPilot

SoldierEMG

SoldierELAW

SoldierEAT

 

SoldierEAA

SoldierEMiner

OfficerE

OfficerENight

GeneralE

Angelina

SoldierESniper

SoldierESaboteur

SoldierESaboteurPipe

SoldierGB

                                                         

SoldierGMedic

SoldierGCrew

SoldierGPilot

SoldierGG

SoldierG

SoldierGNOG

SoldierGMG

SoldierGLAW

SoldierGAT

SoldierGAA

OfficerG

OfficerGNight

Civilian

SoldierGFakeC

Civilian2

SoldierGFakeC2

Civilian3

LandVehicle

Car

Jeep

JeepMG

SkodaHelper

SkodaBase

Rapid

RapidY

Skoda

SkodaBlue

SkodaRed

SkodaGreen

Tractor

Truck

Truck5T

Truck5tRich

Truck5tOpen

Truck5tRepair

Truck5tReammo

Truck5tRefuel

Ural

UralRepair

UralReammo

UralRefuel

Scud

TruckV3SG

TruckV3SCivil

TruckV3SGRefuel

TruckV3SGRepair

TruckV3SGReammo

UAZ

PaperCar

GUAZ - Not sure about this one.  It's defined in 1 place but not the other. Other's defined in both.

UAZG

SGUAZG

GJeep

Tank

APC

M113

M113Ambul

M2StaticMG

M2StaticMGE

BMP

BMPAmbul

M1Abrams

M1AbramsAuto

M60 - Same thing as the GUAZ, but it works so....

RussianTank

T72

T80

ZSU

T55G

Air

Helicopter

Cobra

Parachute

UH60

UH60MG

Mi17

Mi24

Plane

A10

Cessna

Ship

SmallShip

BoatW

BoatWAuto

BoatE

BigShip

CarrierW

Logic

Static

Fortress

Building

NonStrategic

Fire

Fence

FenceWood

Wire

WireFence

FpLogo

Fountain

House - not checked for subclasses

Houseryb_domek

Housemajak

Houseplechbud

Housedeutshe_mini

Housebouda2_vnitrek

Housedeutshe

Housedum_mesto

Housedum_mesto2

Housedum_rasovna

Housebouda2

Housebouda3

Housedumruina_mini

Housedum_mesto3

Housestodola_open

Housestatek_kulna

Housedum_mesto2l

Housecihlovej_dum_mini

Housebudova5

Housedumruina

Housedum01

Housecihlovej_dum

Housecihlovej_dum_in

Housebudova1

Housebudova2

Housebudova3

     

Housebudova4

Housegaraz

Housegaraz_bez_tanku

Housegaraz_s_tankem

Houserepair_center

Housedum02

Houseafdum_mesto2

Househospoda_mesto

 

Housestanice

Housedum_m2

Housebouda1

Housestodola

Housestatek_hl_bud

Househospital

                                                          

Housemesto_dum

Housedum_rasovna_in

Househelfenburk

Housedum_olezlina

Houseafdum_mesto3

Houseafhospoda_mesto

Housedulni_bs

Housekostel_trosky

Houseafdum_mesto2l

Housedum_mesto_in

Houseafbarabizna

Househruzdum

Houseammostore2

ViewTower

ViewTower2

Forrest

Forest001

ForestSkewed

Forest001T1

Forest001T2

Forest002

Forest003

Forest004

HeliH

HeliHEmpty

TargetTraining

TargetGrenade

Church

Church001

Church002

Church003

Chapel

Chapel001

Strategic

FuelStation

FuelStationNew

FuelStationNew2

ReammoBox

ReammoBoxWest

ReammoBoxEast

ReammoBoxGuer

HeavyReammoBox

HeavyReammoBoxWest

HeavyReammoBoxEast

heavyReammoBoxRes

MachineGunBox

FlagCarrier

Danger

Target

TargetE

Camp

Cube

CampEmpty

CampEast

CampEastC

Grave

Grave1

Grave2

GraveHelmet

ACamp

MASH

Crawling

ExcerciseTrack

ExcerciseTrack2

ExcerciseTrack3

JeepWreck1

JeepWreck2

JeepWreck3

M113Wreck

UralWreck

Body

Fortress1

Fortress2

Shed

Office

Barracks

Hangar

Hangar_Hall

Hangar_Office

ShedSmall

Thing

Table - Not positive Table class is under Thing class.

Tablemap

Chair

PhoneBase

Camera1

Computer

ChairHangar

ChairX

VideoTable

TablePub

Radio

ChairSmall

ThingEffect

FxExploGround1

FxExploGround2

FxExploArmor1

FxExploArmor2

FxExploArmor3

FxExploArmor4

BarrelHelper

BarrelBase

Barrels

Barrel1

Barrel2

Barrel3

Barrel4

TestObject4

PaletaHelper

PaletaBase

Paleta1

Paleta2

Sound

Owl

Stream

Frog

Froga

Alarm

BirdSinging

Crickets1

Crickets2

Crickets3

Crickets4

Chicken

Cock

Cow

Crow

Wolf

Dog

BadDog

SorrowDog

LittleDog

Music

MineGeneric

MineMine

                 



Appendix B : Weapons and Ammo Object Tree

The following tree shows all of the weapon and ammo types and subtypes in the official game.

Gun73 - Shell73, Heat73

Gun105 - Shell105, Heat105

Gun120 - Shell120, Heat120

Gun125 - Shell125, Heat125

MGun

Riffle

M16 - M16

Mortar - Mortar

Single

Burst

M4 - M16

Single

FullAuto

Ak47 - Ak47

Single

Burst

FullAuto

Ak47CZ - Ak47

Single

Burst

FullAuto

Ak74 - Ak74

Single

Burst

FullAuto

Ak74SU - Ak74

Single

Burst

FullAuto

HK - HK

Single

FullAuto

SniperRiffle

M21 - M21

SVDDragunov - SVDDragunov

MachineGun7_6

MachineGun7_6Manual

 

M60 - M60

 

PK - PK

MachineGun12_7 - Bullet12_7

 

Browning - Bullet05cal

MachineGun30 - Bullet30

 

MachineGun30A10 - MachineGun30A10

 

ZsuCannon - Bullet4x23

                                  

GrenadeLauncher - Grenade

Flare - Flare, FlareGreen, FlareRed, FlareYellow

Throw - HandGrenade, SmokeShell, SmokeShellRed, SmokeShellGreen

RiffleGrenadeLauncher (Riffle + Grenade Launcher)

Riffle

RiffleMuzzle - Riffle

 

GrenadeLauncher

GrenadesMuzzle - GrenadeLauncher, Flare, FlareGreen, FlareRed, FlareYellow

M16GrenadeLauncher (M16 + M203)

M16

M16Muzzle - M16

 

GrenadeLauncher

M203Muzzle - GrenadeLauncher, Flare, FlareGreen, FlareRed, FlareYellow

Ak47GrenadeLauncher (Ak47 + Grenades)

Ak47

M47Muzzle - M47

 

GrenadeLauncher

GrenadesMuzzle - GrenadeLauncher, Flare, FlareGreen, FlareRed, FlareYellow

               

Ak74GrenadeLauncher (Ak74 + Grenades)

Ak74

M74Muzzle - M74

 

GrenadeLauncher

GrenadesMuzzle - GrenadeLauncher, Flare, FlareGreen, FlareRed, FlareYellow

  

Binocular

NVGoggles

Phone

Put - Timebomb, Mine, Pipebomb

Touchoff

LAWLauncher - LAW

RPGLauncher - RPG

AALauncher - AA

AT3Launcher - AT3

HellfireLauncher - Hellfire

HellfireLauncherCobra - HellfireLauncherCobra

HellfireLauncherApach - HellfireLauncherApach

HellfireLauncherHind - AT6

 

MaverickLauncher - Maverick

                                  

ZuniLauncher38 - Zuni

Rocket57x64 - Rocket57

Rocket57x192 - Rocket57

CarHorn

TruckHorn

SportCarHorn



Appendix C : Game voices Appendix

The following are all the voices available in the official game.


Adam
Dan
George
Greg
John
Jonah
Marc
Patrick
Paul
Peter
Rich
Rob
Ted
Tom



Appendix D : Game Face Appendix

The following are all the faces available in the official game.


"face1"=Peter P.
"face2"=Victor B.
"face3"=Bohous
"face4"=Mirek
"face5"=Peter S.
"face6"=Charles
"face7"=Peter V.
"face8"=Richard B.
"face9"=Charles M.
"face10"=Ian O'Hara
"face11"=Vojta N.
"face12"=Adam B.
"face13"=Peter B.
"face14"=Francesco F.
"face15"=Bill O.
"face16"=Colin F.
"face17"=Darren I.
"face18"=Eric J.
"face19"=Phill D.
"face20"=Graham U.
"face21"=Henry G.
"face22"=Ivan B.
"face23"=Ghulam K.
"face24"=Kevin B.
"face25"=Robert
"face26"=Martin
"face27"=John A.
"face28"=Bill G.
"face29"=Peter O.
"face30"=Henry H.
"face31"=William G.
"face32"=ArnoldT.
"face33"=Michael H.
"face34"=John Fox
"face35"=George MacArthur
"face36"=Peter Sun
"face37"=Robert S.
"face38"=John Way
"face39"=Jack C.
"face40"=J.C.
"face41"=Mel D.
"face42"=John M.
"face43"=Jirka M.
"face44"=Honza K.
"face45"=John A.
"face46"=Ondrey N.
"face47"=Ondrey S.
"face48"=Gabriel K.
"face49"=Oliver S.
"face50"=Radan D.
"face51"=George J.
"face52"=Ota B.
"custom"=custom face

There's that girls face too I think.  It is "face99" but doesn't seem to work with  setface. Any idea why??



Appendix E : Character Animations

Here are different character animations you can use with the playmove or switchmove commands.


5TCoDriverV1

5TCoDriverDead

5TCoDriverDying

5TDriver

5TDriverV1

5TDriverDead

5TDriverDying

A10Pilot

A10PilotV1

A10PilotDead

A10PilotDying

AH1Gunner

AH1GunnerV1

AH1GunnerDead

AH1GunnerDying

AH1Pilot

AH1PilotV1

AH1PilotDead

AH1PilotDying

BinocCrouchToCrouch

BinocLyingToLying

BinocStandToStand

BinocToCombat

BMPCommander

BMPCommanderV1

BMPCommanderOut

BMPCommanderOutV1

BMPCommanderOutDead

BMPCommanderOutDying

BMPDriver

BMPDriverV1

BMPDriverOut

BMPDriverOutV1

MPDriverOutDead

MPDriverOutDying

BMPGunner

BMPGunnerV1

BMPGunnerOut

BMPGunnerOutV1

BMPGunnerOutDying

BMPGunnerOutDead

Cargo

CargoDead

CargoDying

CargoVer1

CargoVer2

CargoVer3

CargoVer4

CargoVer5

CesnaCargo

CesnaCargoV1

CesnaCargoDead

CesnaCargoDying

CesnaPilot

CesnaPilotV1

CesnaPilotDead

CesnaPilotDying

CivilDead

CivilDeadVer2

CivilDying

CivilDyingVer2

CivilLying

CivilLyingCrawlF

CivilLyingCrawlL

CivilLyingDying

CivilLyingNoAim

CivilRunF

CivilStillV1

Civilian

standing still pose

CivilWalkF

CombatDead

CombatDeadVer2

CombatDeadVer3

CombatDying

CombatDyingVer2

CombatDyingVer3

CombatOptics

CombatOpticsF

CombatRelaxedDeadVer2

CombatRelaxedDying

CombatRelaxedDyingVer2

CombatRelaxedStill

CombatReloadMortarEnd

CombatRunB

CombatRunBDead

CombatRunBDeadVer2

CombatRunBDying

CombatRunBDyingVer2

CombatRunDeadVer2

CombatRunDying

CombatRunDyingVer2

CombatRunF

CombatRunFToLying

CombatRunL

CombatRunLB

CombatRunLF

CombatRunNF

CombatRunR

CombatRunRB

CombatRunRF

CombatRunThrowGrenadeEnd

CombatSprintF

CombatSprintLF

CombatSprintRF

CombatStillPlayer

CombatStillV1

CombatStrokeGunEnd

CombatThrowGrenadeEnd

CombatToBinoc

CombatToCrouch

CombatToLying

CombatToMedic

CombatToPutDown

CombatToStand

CombatToTreated

CombatToWeapon

CombatTurnL

CombatTurnR

CommandEngageAtWill

CommandFireAtWill

CommandFormation

CommandForward

CommandHoldFire

CommandStop

Commander

CrouchDying

CrouchToBinocCrouch

CrouchToCombat

CrouchToCrouchSprintF

CrouchToLying

CrouchToWeapon

Driver

EffectCombatStand

EffectStandmove

EffectStandSitDown

Sitdown

EffectStandSitDownVer1

EffectStandSitDownVer2

EffectStandSitDownStill

Looks like EffectStandTalk

EffectStandSalute

Stand and Salute I dare say

EffectStandSaluteEnd

EffectStandTalk

Stand and act like you are talking

EffectWeaponPanic

FXangel

Standing rigid with arms to side

FXangel2

Standing rigid with hands over crotch

FXStandAtt

Stand at attention

FXStandAttVar1

FXStandBug

FXStandDangle

FXStandDip

FXStandDropTel

XStandEndTable

FXStandFromDip

FXStandFromTable

Standing from the chair

FXStandhip

Standing and shifting on left hip

FXStandRotateTable

Reach down as if about to rotate table

FXStandShowTable

FXStandStraight

FXStandSur

FXStandSurDead

Another dying while standing pose

FXStandSurDown

Stand and put hands behind your head

FXStandSurUniv

Hands behind your head surrendering

FXStandToDip

FXStandToTel

Lean in to grab telephone

FXStandTelLoop

Sitting talking on phone

FXStandToTelHand

FXStandToTable

FXStandUnivTable

Sitting in chair in front of table?

Gunner

HRLGunner

HRLGunnerV1

HRLGunnerDead

HRLGunnerDying

JeepCoDriver

JeepCoDriverV1

JeepCoDriverDead

JeepCoDriverDying

JeepCoDriverBack

JeepCoDriverBackV1

JeepCoDriverBackDead

JeepCoDriverBackDying

JeepGunner

JeepGunnerV1

JeepGunnerDead

JeepGunnerDying

JeepDriver

JeepDriverV1

JeepDriverDead

JeepDriverDying

LyingCrawlF

LyingCrawlL

LyingDying

LyingNoAim

LyingStillV1

LyingThrowGrenadeEnd

LyingToBinocLying

LyingToCombat

LyingToCombatRun

LyingToCrouch

LyingToPutDownLying

LyingToTreatedLying

LyingToWeapon

M113Driver

M113DriverV1

M113DriverOut

M113DriverOutV1

M113DriverOutDead

M113DriverOutDying

M113Gunner

M113GunnerV1

M113GunnerDead

M113GunnerDying

M113Medic

M113MedicV1

M1A1Commander

M1A1CommanderV1

M1A1CommanderOut

M1A1CommanderOutV1

M1A1CommanderOutDead

M1A1CommanderOutDying

M1A1Gunner

M1A1GunnerV1

M1A1DriverOut

M1A1DriverOutV1

M1A1DriverOutDead

M1A1DriverOutDying

M2Gunner

M2GunnerV1

M2GunnerDead

M2GunnerDying

M60Commander

M60CommanderV1

M60CommanderOut

M60CommanderOutV1

M60CommanderOutDead

M60CommanderOutDying

M60Driver

M60DriverV1

M60DriverOut

M60DriverOutV1

M60DriverOutDying

M60DriverOutDead

M60Gunner

M60GunnerV1

Mi17Pilot

Mi17PilotV1

Mi17PilotDead

Mi17PilotDying

Mi24Gunner

Mi24GunnerV1

Mi24GunnerDead

Mi24GunnerDying

Mi24Pilot

Mi24PilotV1

Mi24PilotDead

Mi24PilotDying

MedicToCombat

OnChair

Sitting in chair

Para

ParaV1

ParaDead

ParaDying

PBRDriver

PBRDriverV1

PBRDriverDead

PBRDriverDying

PBRGunner

PBRGunnerV1

PBRGunnerDead

PBRGunnerDying

Pilot

PutDownLyingToLying

PutDownToCombat

ScudCoDriver

ScudCoDriverV1

ScudCoDriverDead

ScudCoDriverDying

ScudDriver

ScudDriverV1

ScudDriverDead

ScudDriverDyingScudCoDriver

ScudCoDriverV1

ScudCoDriverDead

ScudCoDriverDying

ScudDriver

ScudDriverV1

ScudDriverDead

ScudDriverDying

SkodaCoDriver

SkodaCoDriverV1

SkodaCoDriverDead

SkodaCoDriverDying

SkodaCoDriverBack

SkodaCoDriverBackV1

SkodaCoDriverBackDead

SkodaCoDriverBackDying

SkodaDriver

SkodaDriverV1

SkodaDriverDead

SkodaDriverDying

SitDownToStand

SitDownDying

Stand

StandBase

StandDead

StandDeadVer2

StandDyingVer2

Dying while standing

StandToBinocStand

StandToCombat

EffectStandmove

EffectStandSitDown

EffectStandSitDownVer1

EffectStandSitDownVer2

EffectStandSitDownStill

EffectStandSalute

EffectStandSaluteEnd

StandGetOutTank

Jump out of tank

StandStrokeFist

StandStrokeFistEnd

StandWalkF

T55Commander

T55CommanderV1

T55CommanderOut

T55CommanderOutV1

55CommanderOutDead

55CommanderOutDying

T55DriverOut

T55DriverOutV1

T55DriverOutDead

T55DriverOutDying

T55Gunner

T55GunnerV1

T72Commander

T72CommanderV1

T72CommanderOut

T72CommanderOutV1

T72CommanderOutDead

T72CommanderOutDying

T72DriverOut

T72DriverOutV1

T72DriverOutDead

T72DriverOutDying

T72Gunner

T72GunnerV1

T72GunnerOut

T72GunnerOutV1

T72GunnerOutDead

T72GunnerOutDying

T80CommanderOut

T80CommanderOutV1

T80CommanderOutDead

T80CommanderOutDying

T80GunnerOutV1

T80GunnerOutDead

T80GunnerOutDying

TractorDriver

TractorDriverV1

TractorDriverDead

TractorDriverDying

TreatedLyingToLying

TreatedToCombat

UazCoDriver

UazCoDriverV1

UazCoDriverDead

UazCoDriverDying

UazDriver

UazDriverV1

UazDriverDead

UazDriverDying

UH60Gunner

UH60GunnerV1

UH60GunnerDead

UH60GunnerDying

UH60Pilot

UH60PilotV1

UH60PilotDead

UH60PilotDying

UralCoDriver

UralCoDriverV1

UralCoDriverDead

UralCoDriverDying

UralDriver

UralDriverV1

UralDriverDead

UralDriverDying

V3SCoDriver

V3SCoDriverV1

V3SCoDriverDead

V3SCoDriverDying

V3SDriver

V3SDriverV1

V3SDriverDead

V3SDriverDying

Weapon

WeaponDead

WeaponDying

WeaponDyingVer2

WeaponToCombat

WeaponToCrouch

WeaponToLying

ZSUCommander

ZSUCommanderV1

ZSUCommanderOut

ZSUCommanderOutV1

ZSUCommanderOutDead

ZSUCommanderOutDying

ZSUDriver

ZSUDriverV1

ZSUDriverDead

ZSUDriverDying

ZSUGunner

ZSUGunnerV1

ZSUGunnerOut

ZSUGunnerOutV1

ZSUGunnerOutDead

ZSUGunnerOutDying



Appendix F : Action Type List

Here are list of the actions that you can have a unit perform using the action command.

STR_NO_ACTION

No action available

STR_ACTION_GETIN_COMMANDER

Get in %s as commander

STR_ACTION_GETIN_DRIVER

Get in %s as driver

STR_ACTION_GETIN_PILOT

Get in %s as pilot

STR_ACTION_GETIN_GUNNER

Get in %s as gunner

STR_ACTION_GETIN_CARGO

Get in %s ride in back

STR_ACTION_HEAL

Heal at %s

STR_ACTION_REPAIR

Repair at %s

STR_ACTION_REFUEL

Refuel at %s

STR_ACTION_REARM

Rearm at %s

STR_ACTION_GETOUT

Get out

STR_ACTION_LIGHTON

Light on

STR_ACTION_LIGHTOFF

Light off

STR_ACTION_ENGINEON

Engine on

STR_ACTION_ENGINEOFF

Engine off

STR_ACTION_WEAPON

Weapon %s

STR_ACTION_MAGAZINE

Reload %s

STR_ACTION_TAKEWEAPON

Take %s

STR_ACTION_DROPTAKEWEAPON

Take %s (drop %s)

STR_ACTION_TAKEMAGAZINE

Take %s

STR_ACTION_DROPTAKEMAGAZINE

Take %s (drop %s)

STR_ACTION_TAKEFLAG

Take Flag

STR_ACTION_RETURNFLAG

Return Flag

STR_ACTION_TURNIN

Turn in

STR_ACTION_TURNOUT

Turn out

STR_ACTION_WEAPONINHAND

%s in hand

STR_ACTION_WEAPONONBACK

%s on back

STR_ACTION_SITDOWN

Sit down

STR_ACTION_EJECT

Eject

STR_ACTION_LAND

Landing autopilot

STR_ACTION_CANCEL_LAND

Landing autopilot off

STR_ACTION_TO_DRIVER

To driver's seat

STR_ACTION_TO_PILOT

To pilot's seat

STR_ACTION_TO_GUNNER

To gunner's seat

STR_ACTION_TO_COMMANDER

To commander's seat

STR_ACTION_TO_CARGO

To back seat

STR_ACTION_HIDE_BODY

Hide body

STR_ACTION_TOUCH_OFF

Touch Off %d bomb(s)

STR_ACTION_START_TIMER

Set timer on (%.0f seconds)

STR_ACTION_SET_TIMER

Set timer +%.0f sec. (%.0f remaining)

STR_ACTION_DEACTIVATE

Deactivate bomb

STR_ACTION_TAKEOFF_GOGGLES

Take off NV goggles

STR_ACTION_TAKEON_GOGGLES

Take on NV goggles

STR_ACTION_MANUAL_FIRE

Manual fire

STR_ACTION_MANUAL_FIRE_CANCEL

Cancel manual fire

STR_ACTION_HOVER

Auto-hover

STR_ACTION_HOVER_CANCEL

Cancel Auto-hover

STR_ACTION_STROKEFIST

Strike with fist

STR_ACTION_STROKEGUN

Strike with gun



Appendix G : Quick Weapon/Ammo List

Here are list of the weapon and ammo types you can equip with the addweapon and addmagazine commands as well as unequip with the removeweapon and removemagazine commands.


NATO Weapons & Ammo

Weapon Name

Ammo Name

Notes

HK

HK

H&K MP5SD

M4

M4

XM-177E2 or Car-15

M16

M16

M16A2

M16GrenadeLauncher

M16GrenadeLauncher

M16 & M203

M60

m60

 

M21

m21

Sniper

LAWLauncher

LAWLauncher

Light Anti Armor Weapon

CarlGustavLauncher

CarlGustavLauncher

NATO heavy Anit-Tank Weapon

AALauncher

AALauncher

FIM92A Stinger AA Launcher



NATO Vehicle Ammo

Weapon Name

Ammo Name

Notes

MaverickLauncher

MaverickLauncher

Missiles on A10

MachineGun30A10

MachineGun30A10

Gun on A10

HellfireLauncherCobra

HellfireLauncherCobra

TOWs on AH-1

HellfireLauncherApach

HellfireLauncherApach

Hellfire on the AH-64

ZuniLauncher38

ZuniLauncher38

FFAR on AH-1 and UH-60

MachineGun30

MachineGun30

Gun on AH-1

Browning

Browning

MachineGun on UH-60 MG, CH-47, M2, M113, PBR II and Jeep with gun

Gun120

HEAT120

Main Gun M1A1 HEAT

Gun120

SHELL120

Main Gun M1A1 SABOT

MachineGun12_7

MachineGun12_7

MachineGun M1A1 and M60

Gun105

HEAT105

Main Gun M60 HEAT

Gun105

SHELL105

Main Gun M60 SABOT

VulcanCannon

VulcanCannon

Main Gun M113 Vulcan



Soviet (and Rebel) Weapons & Ammo

Weapon Name

Ammo Name

Notes

AK74SU

AK74

 

AK74

AK74

 

AK74GrenadeLauncher

GrenadeLauncher

 

AK47CZ

AK47

AK-47 v.58

AK47

AK47

 

AK47GrenadeLauncher

GrenadeLauncher

 

PK

PK

 

SVDDragunov

SVDDragunov

Sniper

RPGLauncher

RPGLauncher

Rocket Propelled Grenade

AT4Launcher

AT4Launcher

Sov.Heavy Anti-Tank

9K32Launcher

9K32Launcher

9K32 Strela AA Launcher



Soviet (and Rebel) Vehicle Ammo

Weapon Name

Ammo Name

Notes

Ch29TLauncher

Ch29TLauncher

Rockets on Su25

Rocket57x64

Rocket57x64

Unguided Rockets on Su25 and Hind

MachineGun30A10

MachineGun30A10

Gun on Su25

HellfireLauncherHind

HellfireLauncherHind

Guided Rockets on Hind

MachineGun30

MachineGun30

MachineGun on Hind

Rocket57x192

Rocket57x192

Rockets on Mi17

Browning

Browning

M2 East, East Boat, Resitance Jeep w/ MG

GUN125

HEAT125

Main Gun T80 HEAT

GUN125

SHELL125

Main Gun T80 SABOT

MachineGun12_7

MachineGun12_7

MachineGun T80

GUN120

HEAT120

Main GUn T72 HEAT

GUN120

SHELL120

Main GUn T72 SABOT

MachineGun7_6

MachineGun7_6

MachineGun T72, BMP

GUN73

HEAT73

Main Gun BMP HEAT

GUN73

SHELL73

Main Gun BMP SABOT

ZsuCannon

ZsuCannon

Main Gun Shilka

GUN105

HEAT105

Main Gun T55 HEAT (Resistance)

GUN105

SHELL105

Main Gun T55 SABOT (Resistance)

MachineGun7_6

MachineGun7_6

MachineGun T55 (Resistance)



Equipment

Weapon Name

Ammo Name

Notes

Binocular

N/A

 

NVGoggles

N/A

Night Vision Goggles

Flare

Flare

 

FlareRed

FlareRed

 

FlareGreen

FlareGreen

 

FlareYellow

FlareYellow

 

SmokeShell

SmokeShell

 

SmokeShellRed

SmokeShell Red

 

SmokeShellGreen

SmokeShell Green

 

HandGrenade

HandGrenade

 

Pipebomb

Pipebomb

Stachel Charges

Timebomb

Timebomb

Stachel Charges

Mine

Mine

 

Appendix H : Description.ext File Format


// Description.ext (in the Mission directory) file format description
// OFP Editing Center ofpeditingcenter.com
//
// This file describes the format of the description.ext file which resides
// in each mission's directory.


// Used for scoring the mission.
minScore=200
avgScore=2500
maxScore=6000

// Title that appears on screen in briefing
onLoadIntro="Eric Stratton. Rush Chairman. Damn glad to meet ya"

// Title that appears on screen at beginning of mission
onLoadMission="Central part of Malden, near the camp in Lolisse"


// Seems to be some definition of Respawns, if and how it is possible
respawn=3;
// Seems to be Time between Respawns
respawndelay=2;

// Indicates whether or not the debriefing window appears at end of the mission 0 = no, 1 = yes
debriefing = 0

// Indicates whether or not to display the watch during the briefing 0 = no, 1 = yes
showWatch = 1

// Indicates whether or not to display the compass during the briefing 0 = no, 1 = yes
showCompass = 1

// Indicates whether or not to display the notepad during the briefing 0 = no, 1 = yes
showNotepad = 1

// Indicates whether or not to display the global positioning system during the
// briefing 0 = no, 1 = yes
showGPS = 1

// Indicates whether or not to display the map during the briefing 0 = no, 1 = yes
showMap = 1

// ??
onLoadIntroTime = true




// This class allows you to provide some uniqueness to some of the characters in the game.
class CfgIdentities
{


// The class name is referenced in missions.sqm file with setidentify command
class Officer
{
// Name of this individual
// This name appears on the screen when the associated character does a
// builtin action (for example..telling others to dismount)
name = "Ngwala Bahalai";

// Face texture to use for this character
// Values are :
// "Face33"
// "Face2"
// "Face8"
// "Face10"
// "Face11"
// "Face18"
face = "Face33";


// Wearing glasses?
// Values are :
// "none" = no glasses
// "spectacles"
// "sunglasses"
glasses = "none";


// Voice to use for this character
// Values are :
// "Adam"
speaker = "Adam";


// Pitch of voice
// 1.0 = normal pitch
// < 1.0 = deeper voice
// > 1.0 = higher voice
pitch = 1.00;
};


};


// Define sounds in the game.
class CfgSounds
{
// Contains a list of all the .ogg files (without the .ogg extension) which are
// in all of the CfgSounds class instances below.
sounds[] =
{
S02v01, S02v02, S02v03, S02v05, S02v06, S02v07, S02v08, S02v12, S02v13, S02v14,
S02v50
};


// Define a specific sound
// The class name is referenced in the mission.sqm file. (e.g. say ""S02v61"")
class S02v61
{
// Name. Why do some have names and others don't? How is this used?
name = "";

// Sound file to use
// First entry is sound file to use (from sounds directory)
// Second field?
// Third field? Pitch maybe?
sound[] = {"S02v61.ogg", db-10, 1.0};


// Text String to accompany the sound. Found in stringtable.csv file
// What does multiple entries mean?
titles[] =
{
0, $STRM_S02v61
};
};



}


// Sound effects? Wasn't used in demo
class CfgSFX
{
sounds[] = {};
};


// Env sounds? Wasn't used in demo.
class CfgEnvSounds
{
sounds[] = {};
};


// Radio chatter?
// Same struct as CfgSounds
class CfgRadio
{
// Contains a list of all the .ogg files (without the .ogg extension) which are
// in all of the CfgRadio class instances below.
sounds[] =
{
S02r16, S02r17, S02r18, S02r19, S02r20, S02r21, S02r22, S02r23, S02r24
};


// Class name is referenced in the mission.sqm file. (E.g. sideRadio ""S02r15"")
class S02r15
{
name = "";

// Sound file to use
// First entry is sound file to use (from sounds directory)
// Second field?
// Third field? Pitch maybe?
sound[] = {"S02r15.ogg", db-40, 1.0};



// Text String to accompany the sound. Found in stringtable.csv file
title = $STRM_S02r15;
};
};



// Music
class CfgMusic
{
// Contains a list of all the .ogg files (without the .ogg extension) which are
// in all of the CfgMusic class instances below.
tracks[]=
{
01demo, 05demo, 11demo,
demo1985, democut, demomixdown
};


// Definition for a specific music track
// The class name is referenced in the mission.sqm file. (E.g. track="01demo")
class 01demo
{
// Name. How is this used?
name = "Demo 01";


// Sound file to use
// First entry is sound file to use (from music directory)
// Second field?
// Third field? Pitch maybe?
sound[] = {\music\01demo.ogg, db+0, 1.0};
};
};

// This class indicates what weapons to make available to the player in the mission
// briefing. Each subclass is optional. The count field in each subclass indicates
// the number of that weapon to make available.
// NEED TO FIGURE OUT THE OTHER TYPES
class Weapons
{
class M16
{
count = 1;
};
class M16GrenadeLauncher
{
count = 1;
};
class M4
{
count = 1;
};
class M60
{
count = 1;
};
class HK
{
count = 1;
};
class M21
{
count = 1;
};
class CarlGustavLauncher
{
count = 1;
};
class LAWLauncher
{
count = 1;
};
};

// This class indicates what weapon magazines to make available to the player in the mission
// briefing. Each subclass is optional. The count field in each subclass indicates
// the number of that magazine to make available.
// NEED TO FIGURE OUT THE OTHER TYPES
class Magazines
{
class M16
{
count = 10;
};
class HandGrenade
{
count = 10;
};
class GrenadeLauncher
{
count = 10;
};
class M4
{
count = 10;
};
class M60
{
count = 10;
};
class M21
{
count = 10;
};
class HK
{
count = 10;
};
class Mine
{
count = 10;
};
class PipeBomb
{
count = 10;
};
class TimeBomb
{
count = 5;
};
class CarlGustavLauncher
{
count = 1;
};
class LAWLauncher
{
count = 4;
};
class Mortar
{
count = 5;
};
class SmokeShell
{
count = 10;
};

};

Appendix I : Campaign Description.ext File Format


Campaign Description.ext File Format

// Description.ext (in the Campaign directory) file format description
// OFP Editing Center ofpeditingcenter.com
//
// This file describes the format of the description.ext file which resides
// in the Campaign directory.


// This class defines the speaking roles in the campaign. The format of this
// is the same as the CfgIdentities class in each mission's description.ext file.
// WHAT DOES IT MEAN TO DEFINE IDENTITIES HERE VS IN MISSIONS?
class CfgIdentities
{

}

// This class defines the various awards the player can win during the campaign
class Awards
{
    // This defines an individual award. In the official campaign the name
// of each class was Award01 to AwardXX
    class Award01
    {
        // Is this used to adjust the player's score?
        limit = 12;

        // Indicates the mission to play when the award is given on each
        // island. Refers to a mission subdirectory in the campaign's missions
        // directory
        abel = XXREWARD1.ABEL;
        cain = XXREWARD1.CAIN;
        eden = XXREWARD1.EDEN;
    };
};

// This class defines the various penalties the player can incur during the campaign
class Penalties
{
    // This defines an individual penalty. In the official campaign the name
// of each class was typically Penalty01 to PenaltyXX
    class Penalty01
    {
        // Is this used to adjust the player's score
        limit = -1;

        // Indicates the mission to play when the penalty is given on each
        // island. Refers to a mission subdirectory in the campaign's missions
        // directory
        abel = XXPUNISH1.ABEL;
        cain = XXPUNISH1.CAIN;
        eden = XXPUNISH1.EDEN;
    };

    // This one was also in the official campaign. Is this a special one?
    class PenaltyGameOver
    {
        // total end of campaign - see exitScore
        limit = -15;
        abel = XXGAMEOVER.ABEL;
        cain = XXGAMEOVER.CAIN;
        eden = XXGAMEOVER.EDEN;
    };
};

// Not sure what this is used for.
exitScore = -15;

// Default Mission class. In the official campaign all of the missions seemed to
// be inherited? from this class.
class MissionDefault
{
    lives = -1;

    lost = ;
    end1 = ;
    end2 = ;
    end3 = ;
    end4 = ;
    end5 = ;
    end6 = ;
};


// This class defines the entire campaign
class Campaign
{
    // Name of the campaign. Displayed when choosing the campaign to play
    name = "1985 - Cold War Crisis";

    // This indicates the first battle in the campaign. It is the name of
    // one of the battle classes defined below
    firstBattle = Prologue;
   
   
    // This class defines a battle in the campaign. You can have multiple battles
    // defined in a campaign.
    class Prologue
    {
        // Name of the battle
        name = "PROLOGUE";
       
        // Cutscene to play before the battle. Refers to the name of a mission
        // subdirectory in the campaign's Missions directory. If left empty then
        // there is no cutscene for this battle
        cutscene = x00Grounds.Abel;

        // First mission to play in this battle. Refers to the name of one of
        // the mission classes defined below.
        firstMission = Training;

        // These fields indicate the next battle to play depending on the outcome of
        // this battle. If a mission in this battle has it's end1-end6 or lost
        // fields empty then these fields will be used instead.
        // The ending battle(s) for this campaign should have all of these empty.
        end1 = Part1;
        end2 = Part1;
        end3 = Part1;
        end4 = Part1;
        end5 = Part1;
        end6 = Part1;
        lost = Part1;

        // This class defines a mission in this battle.
        // Is this inheriting from MissionDefault?
        class Training: MissionDefault
        {
            // ?
            noAward=true;

            // These fields indicate the next mission to play depending on the
            // outcome of this mission. If one of these fields has an empty
            // value then the corresponding field in the battle class will be
            // used to advance to the next battle.
            end1 = IansOffice;
            end2 = IansOffice;
            end3 = IansOffice;
            end4 = IansOffice;
            end5 = IansOffice;
            end6 = IansOffice;
            lost = Training;

            // Refers to the mission subdirectory in this campaign's Missions
            // directory to use for this mission
            template = 00Training.Abel;
        };
    };
};


// This class defines the sounds in the campaign. The format of this
// is the same as the CfgSounds class in each mission's description.ext file.
// The sound files referred to in this class will be found in the in the OFP/DTA/sound.pbo
// file directory or in the campaign's DtaExt/Sound directory.
// Any localized strings in this class will be found in the campaign's stringtable.csv file.
// WHAT DOES IT MEAN TO DEFINE SOUNDS HERE VS IN MISSIONS?
class CfgSounds
{
}

// This class defines the radio sounds in the campaign. The format of this
// is the same as the CfgRadio class in each mission's description.ext file.
// The sound files referred to in this class will be found in the in the OFP/DTA/sound.pbo
// file directory or in the campaign's DtaExt/Sound directory.
// Any localized strings in this class will be found in the campaign's stringtable.csv file.
// WHAT DOES IT MEAN TO DEFINE RADIO SOUNDS HERE VS IN MISSIONS?
class CfgRadio
{
};

 

Appendix J : Useful Mathematics For OFP

Common Letters Used:

Ar=Area
D=Diameter
C=Circumference
R=Radius
S=Displacement (distance travelled in a certain amount of time)
U=Initial speed of an object
V=Current speed of an object
T=Time
Ac=Acceleration
x=Unknown value
theta=An angle, such as that between the ground and the player, or north and the player's direction.

For circles:

Ar=pi*(R^2)
C=pi*D

For unit speeds/distances etc

S=V/T (Simple)
S=(U*T)+0.5(Ac*(T^2)) (Advanced)
V=sq root((U^2)+(2*Ac*S))
V=U+(Ac*T)
Vhorizontal=V*Cos theta
Vvertical=V*Sin theta

General

Pythagoras's Theorum:
A^2=B^2+C^2 If a is largest side
A^2=B^2-C^2 Id a is not the largest side

Not sure how much use these will be but they might help someone. :)