BZII DLL Scriptor
Operations
(Version 1.1)
[Back to Overview]
You can choose from over 120 script operations while creating your DLL script. Most operations require other data for them to work. The types of data are as follows.
Data Types
Integer
- This type of data is entered in the operation as a number, although that number must be between -32767 and +32767.
Object
- This type of data is basically a name that you declare in the [objects] section. Certain script operations can associate an object name with an actual object in the mission. Usually this association is done when an object is created by your script, but there are many other script commands that can associate an object name with an actual game object.
Other script operations use the object name to make an object do something or find out information on that object. An object name can be reused once a script is done with the game object that it was associated with. Some object names should be used for the same object for the duration of a mission, i.e. if you wish to create a trigger routine that ends the game when the object is destroyed.
Position
- This type of data is a map position or an offset position that you declare and can initialize in the [positions] section. It has 3 components, an X, a Y and a Z component.
Variable
- This type of data is a number storage variable that you can declare and initialize in the [variables] section. It can be used to store a number for repeated use by your script.
"Text", "FileName", "ODFName", "ObjectName" or "PathName"
- These types of data are for character strings such as file names, ODF names and path names that are used in the actual mission. You don't need to declare them anywhere before using them in a script operation. The text must be enclosed in quotation marks, and can't be more than 19 characters and/or spaces long.
Textname
- This type of data is a name that was given to a text string in the [text] section. It is only used by the display command.
Routine
- This type of data is a reference to a routine.
Label
- This type of data is a reference to a part of the script where a label is placed. Operations that use a label as an arguement can cause the routine to jump to the part of the script where that label is placed.
Color
- When setting the color of displayed text using the display command, you can specify white, green or red. For example: display,StartText,white.
Boolean
- This is a type of data that is either "true", or "false".
Parameters that are
green are optional under most circumstances. Operands with an asterisk * after them are items that can take on a new value or meaning as a result of the operation.
___________________________________________
Alphabetized Listing of Operations
AddAmmo
, object, integer
Increases the ammo of the object by the integer amount.
Example: addammo,theplayer,1000
AddHealth
, object, integer
Increases the health of the object by the integer amount.
Example: addhealth,theplayer,1000
AddScrap
, integer-a, integer-b
Increases the scrap of the integer-a team by the integer-b amount.
Example: addscrap,5,50
Add
, variable-a, integer, variable-b*
Adds the variable-a to the integer and stores the result in variable-b. If variable-b is not present then the result is not stored at all. You can then use an "if" type command, such as IfLT, to compare the result and possibly go to another part of the script.
Example: add,counter1,1,counter1
Could be followed by: iflt,5,MORE_SCIONS
AddToPos
, integer-a, integer-b, integer-c, position*
Adds integer-a to the X component, integer-b to the Y component, and integer-c to the Z component of the position.
Example: addtopos,10,0,10,spawnposition
AllLookAt
, integer-a, object, integer-b
Scripts the integer-a team to look at the object with the integer-b priority (0 returns control to the commander).
Example: alllookat,5,player,1
Ally
, integer-a, integer-b
Causes the integer-a team to become allied with the integer-b team.
Example: ally,1,2
Attack
, object-a, object-b, integer
Scripts object-a to attack object-b with the integer priority (0 returns control to the commander).
Example: attack,warrior1,iscav1,1
Audio,
"filename"
Plays the "filename" (maximum of 19 characters) wav file.
Example: audio,"voice1.wav"
BeaconOn,
object
Causes a labelled beacon to appear, centered in the direction of the object.
Example: beaconon,iconst
BeaconOff,
object
Turns off a beacon centered on the object.
Example: beaconoff,iconst
Build,
object, "odfname", integer
Scripts the object (i.e. the constructor) to build the "odfname" (maximum of 19 characters) object at the integer priority (0 returns control to the commander). Must be followed up by a DropOff command.
Example: build,icons,"ibgtow",1
Could be followed by: dropoff,icons,"tower1",1
CamObject
, object-a, position, object-b, integer
Performs a camera sequence that places the camera at the position (in meters) relative to object-a, and tracks object-b for the integer number of seconds. If the player hits the space bar the sequence is ended. Note: The camera motion may be excessive if object-a is moving. IMPORTANT: The script must not allow multiple routines to perform camera operations at the same time. Also, unusual results may occur if the routine is running at a runspeed higher than 1, or the routine is running at low priority.
Example: camobject,factory,offsetpos,titanattacker,10
CamPos
, object, position-a, position-b, integer
Performs a camera sequence that places the camera at the position-a (in meters) relative to the object, and tracks it as it moves to position-b at the integer speed in cm per second. If the player hits the space bar the sequence is ended. IMPORTANT: The script must not allow multiple routines to perform camera operations at the same time. Also, unusual results may occur if the routine is running at a runspeed higher than 1, or the routine is running at low priority.
Example: campos,recycler,highoffsetpos,closeoffsetpos,1000
CamPath
, "pathname", integer-a, integer-b, object
Performs a camera sequence that moves the camera along the "pathname" (case-sensitive, maximum of 19 characters) path at integer-a cm above the ground and a speed of integer-b cm per second while tracking the object. If the player hits the space bar the sequence is ended. WARNING: The speed should be greater than 500 to avoid lockup. IMPORTANT: The script must not allow multiple routines to perform camera operations at the same time. Also, unusual results may occur if the routine is running at a runspeed higher than 1, or the routine is running at low priority.
Example: campath,"camera_1",1000,1000,hauler
CamPathDir
, "pathname", integer-a, integer-b, boolean
Performs a camera sequence that moves the camera along the "pathname" (case-sensitive, maximum of 19 characters) path at integer-a cm above the ground and a speed of integer-b cm per second while tracking in the direction of the movement. If the boolean equals true, then the player can't abort the sequence. If it is false the player can abort using the space bar. IMPORTANT: The script must not allow multiple routines to perform camera operations at the same time. Also, unusual results may occur if the routine is running at a runspeed higher than 1, or the routine is running at low priority.
Example: campathdir,"camera_2",500,1000,true
ChangeSide
Unknown. Maybe it causes the player to join a different side.
Clear
Clears all of the objective text.
Example: clear
ClearTeamColor
, integer
Clears the integer team's color, leaving it the default color.
Example: clear,1
ConsoleResult
Outputs the last computation to the console.
Example: consoleresult
ConsoleWord
, "text"
Outputs the "text" (maximum of 19 characters) to the console. May be useful for debugging, or just to have your name or another message sent to the console.
Example: consoleword,"recycler is dead"
Create
,object*, "odf", integer, position
Creates the script object as defined by the "odf" (maximum of 19 characters) on the integer team number at the specified script position.
Example: create,warrior1,"fvtank",5,northpoint
Createp
,object*, "odf", integer, "pathname"
Creates the script object as defined by the "odf" (maximum of 19 characters) on the integer team number at the pathpoint labelled "pathname" (maximum of 19 characters).
Example: create,warrior1,"fvtank",5,"spawnpoint1"
Defend,
object-a, object-b, integer
Scripts object-a to defend object-b with the integer priority (0 returns control to the commander).
Example: defend,warrior1,hauler,1
Display
, textname, color, variable-a, variable-b
Displays the objective labelled textname with the color (white, green or red). If variable-a and/or variable-b are included then the value of each included variable would be shown wherever a %i was placed in the text string (one for each variable).
Example: display,StartObjective,white
DistObject,
object-a, object-b
Computes the distance in meters between object-a and object-b. The results can be used by the statement that comes after it.
Example: distobject,scout1,player
Could be followed by: ifgt,40,SCOUT_TOO_FAR
DistPath
, object, "pathname"
Computes the distance in meters between the object and the path-point labelled "pathname" (case-sensitive, maximum of 19 characters). The results can be used by the statement that comes after it.
Example: distpath,scionscav,"goalpath"
Could be followed by: ifgt,40,SCAV_TOO_FAR
DropOff,
object, "pathname", integer
Scripts the object to drop of its cargo at the pathpoint named "pathname" (case-sensitive, maximum of 19 characters) at the integer priority (0 returns control to the commander).
Example: dropoff,tug,"drop_point",1
EjectPilot
, object
Causes the pilot to eject from the object.
Example: ejectpilot,scout1
EvalPos
, position, integer
Evaluate the integer component of the position. If integer is 0, then X is the result. If integer is 1, then Y is the result, if integer is 2, then Z is the result. The result can be used by the statement that comes after it.
Example: evalpos,playerpos,1
Could be followed by: iflt,100,NOT_HIGH_ENOUGH
Fade
, integer-a, integer-b, integer-c
Causes a fade-in. Details of this operation are sketchy, although integer-a has something to do with ratio, integer-b has something to do with rate and integer-c has something to do with color. The following example seems to implement a decent fade-in.
Example: fade,4000,30,1
Fail
, integer, "filename"
Causes the mission to end in the integer number of seconds, and displays the death screen with the text in the "file".
Example: fail,10,"swampwampf.des"
Follow
, object-a, object-b, integer
Scripts object-a to follow object-b with the integer priority (0 returns control to the commander).
Example: follow,iscout1,icons,1
GetAlt
, position-a, position-b*
Gets the altitude of the terrain at position-a and optionally stores the complete position, including the height as position-b if it is specified. The results can be used by the statement that comes after it.
Example: getalt,nearenemybase
Could be followed by: ifgt,500,SEND_ARCHERS
GetByIndex
, object-a, object-b, variable
An object indexing operation that sets object-a equal to object-b<variable> in the object-b array group.
Example: getbyindex,TheAttacker,AttackerGroup,Count
GetByLabel
, object, "objectname"
Assigns object to the game object that was labelled as "objectname" using the BZII map editor.
Example: getbylabel,tank1,"tank_1"
GetByTS
, object, integer-a, integer-b
Get by team and slot number. Assigns the object name to the building on the integer-a team in the integer-b control slot.
Example: getbyts,FriendFactory,1,2
Control slots are: 1 - recycler, 2 - factory, 3 - armory, 4 - training, 5 - bomber bay.
GetCommand
, object
Gets the number corresponding to the command or action that an object is performing. You can then use an "if" type command, such as IfLT, to compare the result and possibly go to another part of the script.
Example: getcommand,icons
Could be followed by: ifeq,0,CONSTRUCTOR_IS_DONE
Command numbers are:
0 = CMD_NONE, 1 = CMD_SELECT, 2 = CMD_STOP, 3 = CMD_GO, 4 = CMD_ATTACK, 5 = CMD_FOLLOW, 6 = CMD_FORMATION, 7 = CMD_PICKUP, 8 = CMD_DROPOFF, 9 = CMD_UNDEPLOY, 10 = CMD_DEPLOY, 11 = CMD_NO_DEPLOY, 12 = CMD_GET_REPAIR, 13 = CMD_GET_RELOAD, 14 = CMD_GET_WEAPON, 15 = CMD_GET_CAMERA, 16 = CMD_GET_BOMB, 17 = CMD_DEFEND, 18 = CMD_RESCUE, 19 = CMD_RECYCLE, 20 = CMD_SCAVENGE, 21 = CMD_HUNT, 22 = CMD_BUILD, 23 = CMD_PATROL, 24 = CMD_STAGE, 25 = CMD_SEND, 26 = CMD_GET_IN, 27 = CMD_LAY_MINES, 28 = CMD_LOOK_AT, 29 = CMD_SERVICE, 30 = CMD_UPGRADE, 31 = CMD_DEMOLISH, 32 = CMD_POWER, 33 = CMD_BACK, 34 = CMD_DONE, 35 = CMD_CANCEL, 36 = CMD_SET_GROUP, 37 = CMD_SET_TEAM, 38 = CMD_SEND_GROUP, 39 = CMD_TARGET, 40 = CMD_INSPECT, 41 = CMD_SWITCHTEAM, 42 = CMD_INTERFACE, 43 = CMD_LOGOFF, 44 = CMD_AUTOPILOT, 45 = CMD_MESSAGE, 46 = CMD_CLOSE.
GetCompForce
Determines what computer force setting the player chose. The results can be used by the statement that comes after it.
Example: getcompforce
Could be followed by: iflt,1,SMALL_FORCE
GetCurAmmo
, object
Determines the ammo level of the object. The results can be used by the statement that comes after it.
Example: getcurammo,itank1
Could be followed by: iflt,1000,GET_POWERUP
GetCurHealth
, object
Determines the health level of the object. The results can be used by the statement that comes after it.
Example: getcurhealth,itank1
Could be followed by: iflt,1000,RETREAT
GetMaxHealth
, object
Determines the maximum possible health of the object. The results can be used by the statement that comes after it.
Example: getmaxhealth,itank1
Could be followed by: iflt,1000,TOO_WEEK
GetMaxScrap
, integer
Determines the maximum possible scrap level of the integer team. The results can be used by the statement that comes after it.
Example: getmaxscrap,1
Could be followed by: iflt,100,TOO_LITTLE
GetMySide
Determines the setting of MySide specified in the map's .ini file. The results can be used by the statement that comes after it.
Example: getmyside
Could be followed by: ifeq,0,SCION_PLAYER
Getin,
object-a, object-b, integer
Scripts object-a to get inside object-b with the integer priority (0 returns control to the commander).
Example: getin,ipilot,iscav1,1
GetMode
Determines the mode (team leader or commander) selected by the player. The results can be used by the statement that comes after it.
Example: getmode
Could be followed by: ifeq,0,MODE_0
GetMyForce
Determines what player force setting the player chose. The results can be used by the statement that comes after it.
Example: getmyforce
Could be followed by: iflt,1,SMALL_FORCE
GetPlayer
, object
Associate the declared object with the player's current unit.
Example: getplayer,theplayer
GetPos,
object, position*
Gets the coordinates of the object and stores them in the specified position.
Example: getpos,matriarch,enemypos
GetScrap
, integer
Gets the current scrap level of the integer team. The results can be used by the statement that comes after it.
Example: getscrap,1
Could be followed by: ifgt,100,BUILD_BOMBER
GetRace
, object
Gets a number corresponding to the race of the object. A Scion results in a 0 and an ISDF results in a 1. If the object is neither, or it has been destroyed, the result is 2. The results can be used by the statement that comes after it.
Example: getrace,interloper
Could be followed by: ifeq,1,ALLOW_PASSAGE
GetTarget
, object-a*, object-b
Determines what object is the target of object-b's actions and defines object-a as that object.
Example: gettarget,mysterytarget,tank1
GetTeam
, object*
Determines what team the object is on. The results can be used by the statement that comes after it.
Example: getteam,interloper
Could be followed by: ifeq,5,PERIMETER_BREACH
GetTime
Determines the number of seconds that have elapsed since the mission started. The results can be used by the statement that comes after it.
Example: gettime
Could be followed by: ifgt,500,ATTACK_WAVE
GetTimerTime
Determines the number of seconds remaining on the cockpit timer. The results can be used by the statement that comes after it.
Example: gettimertime
Could be followed by: iflt,5,POST_WARNING
GetTug
, object-a*, object-b
Determines which tug (if any) is towing object-b, and defines object-a as that object.
Example: gettug,mysterytug,relic
GiveWeapon
, object, "odfname"
Gives the "odfname" weapon to the object.
Example: giveweapon,tank1,"gmbolt"
GlobalSpeed
, integer
Sets the DLL to cycle through the integer number of low priority routines each time the DLL is called (every 1/10 second). The DLL defaults to 2 low priority routines per call.
Example: globalspeed,4
GoTo
, object, "pathname", integer
Scripts the object to go to the path labelled "pathname" (case-sensitive, maximum of 19 characters) at the integer priority (0 returns control to the commander).
Example: goto,icons,"base",1
GoToo
, object-a, object-b, integer
Scripts object-a to go to object-b at the integer priority (0 returns control to the commander).
Example: goto,scav1,pool,1
HasCargo
, object
Checks to see if the object is hauling cargo. You can then use an IfEQ command to see if the result was true or false and possibly go to another part of the script.
Example: hascargo,tug1
Could be followed by: ifeq,false,NOT_YET_CARGO
HasPilot
, object
Checks to see if the object has a pilot. You can then use an IfEQ command to see if the result was true or false and possibly go to another part of the script.
Example: haspilot,itank1
Could be followed by: ifeq,true,PILOT_IS_IN
HealthPercent
, object
Determines the percent of health that the object has (0 to 100). The results can be used by the statement that comes after it.
Example: healthpercent,itank1
Could be followed by: iflt,60,REINFORCEMENTS
HopOut
, object
Causes the pilot to hop out of the object.
Example: hopout,scout1
HoppedOutOf
, object-a*, object-b
Determines which vehicle object-b hopped out of, and defines object-a as that object.
Example: hoppedoutof,playervehicle,player
IfEQ
, integer, label
Compares the integer to the calculation of the previous script operation. If they are equal, the script will jump to the point in the script where the label is placed.
Example: ifeq,0,CONSTRUCTOR_IS_DONE
IfGT
, integer, label
Compares the integer to the calculation of the previous script operation. If the previous calculation is greater than the integer, the script will jump to the point in the script where the label is placed.
Example: ifgt,50,OUT_OF_RANGE
IfLT
, integer, label
Compares the integer to the calculation of the previous script operation. If the previous calculation is less than the integer, the script will jump to the point in the script where the label is placed.
Example: iflt,5,MORE_SCIONS
IfNE
, integer, label
Compares the integer to the calculation of the previous script operation. If they are not equal, the script will jump to the point in the script where the label is placed.
Example: ifeq,0,CONSTRUCTOR_IS_DONE
IsAlly
, object-a, object-b
Determines if an object-a is allied with object-b. You can then use an IfEQ command to see if the result was true or false and possibly go to another part of the script.
Example: isally,scav1,nearestunit
Could be followed by: ifeq,false,SCAV_THREATENED
IsAround
, object
Determines if an object is still in the mission. You can then use an IfEQ command to see if the result was true or false and possibly go to another part of the script.
Example: isaround,icons
Could be followed by: ifeq,true,STILL_ALIVE
IsDeployed
object
Determines if an object is deployed. You can then use an IfEQ command to see if the result was true or false and possibly go to another part of the script.
Example: isdeployed,turret1
Could be followed by: ifeq,false,CHECKING_DEPLOYED
IsODF
, object, "odfname"
Checks to see if the object is of the "odfname" type. You can then use an IfEQ command to see if the result was true or false and possibly go to another part of the script.
Example: isodf,mysteryunit,"fvtank"
Could be followed by: ifeq,true,IS_A_WARRIOR
IsPerson
, object
Determines if an object is a person. You can then use an IfEQ command to see if the result was true or false and possibly go to another part of the script.
Example: isperson,mysteryobject
Could be followed by: ifeq,false,CHECK_ANOTHER
IsSelected
, object
Determines if an object is selected by the player. You can then use an IfEQ command to see if the result was true or false and possibly go to another part of the script.
Example: isselected,combunker
Could be followed by: ifeq,false,CHECK_BUNKER
JumpTo
, label
Causes the script to jump to the point in the script where the label is placed.
Example: jumpto,END_OF_RANDOM_EVENTS
KillPilot
, object
Kills the pilot that is occupying the object.
Example: killpilot, warrior1
LookAt
, object-a, object-b, integer
Scripts object-a to look at object-b with the integer priority (0 returns control to the commander).
Example: lookat,scout1,player,1
Mine,
object, "pathname", integer
Scripts the object to lay mines along the path named "pathname" at the integer priority (0 returns control to the commander).
Example: mine,sentry1,"minepath",1
Mult
, variable-a, integer, variable-b*
Multiplies the variable-a by the integer and stores the result in variable-b. If variable-b is not present then the result is not stored at all. You can then use an "if" type command, such as IfLT, to compare the result and possibly go to another part of the script.
Example: mult,counter1,5,counter2
NearObject,
object-a*, object-b
Gets the object closest to object-b and defines object-a as that object.
Example: nearobject,theobject,iscav1
NearVehicle,
object-a*, object-b
Gets the vehicle closest to object-b and defines object-a as that vehicle.
Example: nearvehicle,thevehicle,iscav1
NearVehiclep,
object-a*, "pathname", integer
Gets the vehicle closest to the path named "pathname" at the integer point number in the path, and defines object-a as that vehicle.
Example: nearvehicle,thevehicle,"path_1",1
NearBuilding,
object-a*, object-b
Gets the building closest to object-b and defines object-a as that building.
Example: nearbuilding,mysterybuilding,attacker1
NearEnemy,
object-a*, object-b
Gets the enemy object closest to object-b and defines object-a as that object.
Example: nearenemy,mysteryenemy,asstank
OnDelObject
, integer, routine, object*
Sets up a routine to activate and run at the integer run speed as soon as an object as removed from the map. The specified object name is immediately associated with the destroyed mission object. Note that it is the routine's responsiblity to reset itself to the desired step each time. The routine is always started where it left off previously. If the routine is already active when an object is removed from the mission, the removed object will be ignored. To disable this feature, use the command ondelobject,0.
Example: ondelobject,1,DeletedRoutine,DeletedObject
OnNewObject
, integer, routine, object*
Sets up a routine to activate and run at the integer run speed as soon as an object as added to the map. The specified object name is immediately associated with the newly created mission object. Note that it is the routine's responsiblity to reset itself to the desired step each time. The routine is always started where it left off previously. If the routine is already active when a new object is added to the mission, any new objects will be ignored. To disable this feature, use the command onnewobject,0.
Example: onnewobject,1,NewObjectRoutine,TheNewObject
Patrol,
object, "pathname", integer
Scripts the object to patrol along the path named "pathname" at the integer priority (0 returns control to the commander).
Example: patrol,warrior,"patrolpath",1
Pickup,
object-a, object-b, integer
Scripts object-a to pick up object-b with the integer priority (0 returns control to the commander). Probably only works with tugs.
Example: pickup,itug,iscav1,1
PlaceAt
, object, position
Places the object at the map position.
Example: placeat,theplayer,warppoint
PlaceAtP
, object, "pathname"
Places the object at the path point labelled "pathname" (case-sensitive, maximum of 19 characters)
Example: placeat,theplayer,"warp_point"
PosAngle
, position-a, variable-a, variable-b, position-b*
Sets position-b at a distance of variable-a and an angle of variable-b from position-a.
Example: posangle,startpos,offsetdist,offsetangle,newpos
Quake
, integer
Causes an earthquake or shaking to start at the integer magnitude.
Example: quake,50
RandJump
, label-a, label-b, label-c, label-d
Causes the routine to randomly jump to one of the points in the script where label-a, label-b, label-c or label-d are placed, or to not jump at all. The command can have as few as 1 label or as many as 4 labels to choose from. If 4 labels are listed, the routine has a 1 in 5 chance of jumping to any given label or not jumping at all. If only 1 label is listed, the odds are 50/50 that the routine will either jump to that label, or continue without jumping.
Example: randjump,EVENT2,EVENT3,EVENT4,EVENT5
RandPos
, position-a, position-b, position-c
Randomly selects a position between and including position-b and position-c in the [locations] declarations, and sets position-a equal to the randomly selected position.
Example: randpos,newposition,randompos1,randompos5
RandShift
, position-a, integer-a, integer-b, position-b*
Randomly chooses a position in an integer-a by integer-b box centered on position-a, and sets position-b equal to that position (same altitude).
Example: randshift,centerpos,40,40,newpos
Remove
, object
Removes the object from the mission.
Example: remove,temporarytank
RunSpeed
, routine, integer, boolean-a, boolean-b
Used to command the routine named routine to perform integer-a operations each time the routine has its turn. Setting integer-a to zero turns the routine off. The boolean-a operand sets the priority of the routine, where true means that it has a turn every DLL cycle, and false means that it must wait its turn with other 0-priority routines. The boolean-b operand is optional and causes debug text to be sent to the console with the Debug memory model DLL.
Example: runspeed,checkscavenger,1,0
Service
, object-a, object-b, integer
Scripts object-a to service object-b with the integer priority (0 returns control to the commander). Probably only works for service trucks.
Example: service,healer,matriarch,1
Set
, variable* integer
Sets the variable equal to the integer.
Example: set,count1,0
SetByIndex
, object-a*, variable, object-b
An object indexing operation that sets object-a<variable> equal to object-b in the object-a array group.
Example: setbyindex,AttackerGroup,Count,TheNewGuy
SetCurAmmo
, object, integer
Sets the current ammo of the object to the integer amount.
Example: setcurammo,mauler1,6000
SetCurHealth
, object, integer
Sets the current health of the object to the integer amount.
Example: setcurhealth,recycler,1000
SetPos
, position*, integer-a, integer-b, integer-c
Sets the right, up and forward components of the position equal to integer-a, integer-b and integer-c.
Example: setpos, playerpos
SetMaxHealth
, object, integer
Sets the maximum possible health of the object to the integer amount.
Example: setmaxhealth,recycler,10000
SetGroup
, object, integer
Place the object in the integer group.
Example: setgroup,escort1,2
SetName
, object, "text"
Causes the object to be labelled with the "text" when its beacon is enabled.
Example: setname,scout1,"Shabayev"
SetPlan
, "filename", integer
Loads the "filename" (maximum of 19 characters) AIP file to be used by the game AI for the integer team.
Example: setplan,"mymission1.aip",5
SetScrap
, integer-a, integer-b
Sets the current scrap level of the integer-a team to the integer-b amount.
Example: setscrap,1,150
SetSkill
, object, integer
Sets the skill level of the object to the integer amount.
Example: setskill,attacker,3
SetStep,
routine, label
Sets the step of the routine named routine to the point in the script where the label is placed.
Example: setstep,checkrecycler,START_CHECK_RECYCLER
SetPTeam
, object, integer
Makes the object appear to be a member of the integer team in the eyes of its enemy AI.
Example: setpteam,infiltrator,5
SetTeam
, object, integer
Makes the object a member of the integer team.
Example: setteam,traitor,5
SetWeapon
, object, integer
Sets the chosen weapon hardpoint of the object based on the integer weapon mask. 1 for Hardpoint1, 2 for Hardpoint2, 4 for Hardpoint3, 8 for Hardpoint4, and 16 for Hardpoint5. It is unknown what the effects of other numbers are. Knowledge of binary numbers may assist in trying weapon combinations if possible.
Example: setweapon,attacker,4
ShotBy
, object-a, object-b
Determines which object shot object-b and defines it as object-a.
Example: shotby,theshooter,scav1
StartSound
, "filename"
Starts the sound effect in the filename wav file. This command generates a resulting number that can be stored and used to stop the sound using the stopsound command.
Example: startsound,"background.wav"
Could be followed by: storeresult,soundnumber
StartTimer
, integer
Starts the player's cockpit timer at the integer number of seconds.
Example: starttimer, 3600
Stop
, object, integer
Scripts the object to stop with the integer priority (0 returns control to the commander).
Example: stop,scout1,0
StopSound
, variable
Stop the sound associated with the variable number.
Example: stopsound,soundnumber
StopQuake
Stops an earthquake that is in effect.
Example: stopquake
StopTimer
Stops the player's cockpit timer.
Example: stoptimer
StoreResult,
variable*
Stores the result of the last computation in the variable.
Example: storeresult,recyclerhealth
Succeed
, integer, "filename"
Causes the mission to end in the integer number of seconds, and displays the success screen with the text in the "filename".
Example: succeed,10,"swampwamps.des"
TeamColor
, integer-a, integer-b, integer-c, integer-d
Changes the integer-a team colors to a shade defined by integer-b (red), integer-c (green) and integer-d (blue).
Example: teamcolor,1,150,10,10
UnAlly
, integer-a, integer-b
Causes the integer-a team to become enemies with the integer-b team if they were previously allied.
Example: unally,1,2
UnitSpeed
, object, integer-a, integer-b, integer-c
Causes the object to be moving at the speed defined by integer-a, integer-b and integer-c, as meters per second in the X, Y and Z directions.
Example: unitspeed,player,5,0,25
UpdateQuake
, integer
Changes the current earthquake to the integer magnitude.
Example: updatequake,90
Wait
, integer
Causes the script to wait the integer number of seconds before proceeding to the next operation.
Example: wait,100