SCRIPTING FUNCTIONS

Sort alphabetically | Sort by category

All | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | R | S | T | U | V | Z


CampaignChoice

Special command used only in the main campaign to give the player the option to either continue the campaign or start free-roam.

campaignchoice 0 ;


CheckContraband

Check if player has any contraband in inventory.
Contraband status depends on current region, random events and scripted events.
Function returns either 0(false) or 1(true).

int smuggle = 0 ;
player CheckContraband smuggle ;


ClearAllContraband

Clear contraband list of a region.

int regionId = 1 ; [->regions.wdt]
game ClearAllContraband regionId ;


Create (assemblyex)

Create an assembly entity to be accessed in a script. Assembly is accessed via ID in FreeModel.wds. The special assemblyex object is created locally on the parent object.

int retId = 0 ; [unique entity ID used in the current script only]
float delay = 0.0 ;
float3 position = 0.0 0.0 0.0 ;
int asbId = 46 ; [->FreeModel.wds]
float lifetime = 3.0 ;
assemblyex Create retId delay position asbId lifetime ;


CreateEx (global assembly)

Create an assembly entity to be access in a script. Assembly is accessed via ID in FreeModel.wds. The special assemblyex object created with CreateEx is created in global space, detached from any parent object.

int retId = 0 ; [unique entity ID used in the current script only]
float delay = 0.0 ;
float3 position = 0.0 0.0 0.0 ; [Position where the assembly will be created]
int asbId = 15 ; [->FreeModelswds]
float lifetime = 5.0 ; [duration of the created entity]
assemblyex CreateEx retId delay position asbId lifetime ;