Page tree
Skip to end of metadata
Go to start of metadata

ObjectVariables are variables that hold temporary property information for a specific Object.

Most of the variables listed below are set by the game itself, and shouldn't be modified, as that may lead to unpredictable outcomes. They can be read though (via getVariable), to extract more object information than would otherwise be available.

Some variables are user-definable, to modify the game or object behavior. These are indicated in green, and have their parameter format listed right behind the variable name, e.g. NOTVISIBLEINEDITOR (Boolean). To change these variables, use the setVariable command, together with the variable name and the desired value, e.g. hiddenItem setVariable ["NOTVISIBLEINEDITOR",false]

For further available object properties see the article on Editor Object.

All of the object variables are case sensitive, and have to be used in the exact capitalization as they are listed here.

Airstrike

  • VBS2_AIRSTRIKE_POS: Airstrike position [EO]
  • VBS2_AIRSTRIKE_RADIUS: Airstrike radius [EO]
  • VBS2_AIRSTRIKE_SIDE: Airstrike side [EO]
  • VBS2_AIRSTRIKE_REPEATED: Repeated check for airstrike editor object [EO]
  • VBS2_AIRSTRIKE_DELAY: Airstrike delay [EO]
  • VBS2_AIRSTRIKE_CONDITION: Airstrike condition [EO]
  • VBS2_AIRSTRIKE_PRIORITIES: Airstrike priority list [EO]
  • VBS2_AIRSTRIKE_NAME: Airstrike name [EO]
  • VBS2_AIRSTRIKE_LINK: Links to Airstrike targets [EO]
  • VBS2_AIRSTRIKE_MISSION_TARGET: Aircraft target / Target hostile [AIRCRAFT/TARGET]
  • VBS2_AIRSTRIKE_EVENTS: Event-handlers on targets and aircraft [AIRCRAFT/TARGET]
  • VBS2_AIRSTRIKE_ACTIVE: Currently active aircraft [AIRCRAFT]
  • VBS2_AIRSTRIKE_AIRCRAFT: Viable aircraft [EO]
  • VBS2_AIRSTRIKE_TARGETS: Viable targets [EO]
  • VBS2_AIRSTRIKE_DENY_SWITCH: Prevents aircraft from engaging centre of Airstrike after engaging targets [EO]
  • VBS2_AIRSTRIKE_PRIORITY: Target priority delegation [AIRCRAFT]
  • VBS2_AIRSTRIKE_AIRCRAFT_WEAPONS: Aircraft weapon check [AIRCRAFT]
  • VBS2_AIRSTRIKE_WAITING: Aircraft in queue for target [AIRCRAFT]
  • VBS2_AIRSTRIKE_TRIGGER_CHECK: Airstrike shutdown condition [EO]
  • VBS2_AIRSTRIKE_MISSION_TARGET_PLAYER: Exclusivity to non-players condition [TARGET]
  • VBS2_AIRSTRIKE_TARGET_GROUPS: Target groups [EO]
  • VBS2_AIRSTRIKE_EH_ARRAY: Airstrike event handlers [EO]

Artillery

  • ArtilleryAmmo: Ammo class
  • ArtillerySalvoes: Number of guns/planes
  • ArtilleryRounds: Number of rounds/bombs
  • ArtilleryDispersion: Impact radius
  • ArtilleryDelayBetweenRounds: Delay between guns/bombs
  • ArtilleryDelayBetween: Reload time / Delay between planes
  • ArtilleryDelayUntil: Delay until start
  • ArtilleryID: Artillery index
  • ArtilleryCondition: Condition String
  • ArtilleryPlane: Class on delivery plane (empty if none)
  • ArtilleryApproach: Plane approach direction
  • ArtilleryMode: Time until strike. 1: >10 seconds (green arrow), 2: <=10 sec (yellow arrow), 3: strike imminent (red arrow)
  • ArtilleryPos: Drop position as PositionASL array

Construction Objects

  • VBS_ENG_constrProps: Array containing general information about object (structure not finalized yet)
  • VBS_ENG_constrWork: Amount of work (in seconds) that has been applied to object (should be modified via fn vbs engineering logWork)

Control Stations

  • UAV_PhP_GCS_ACT_ON_START: Activate on mission start
  • UAV_PhP_GCS_ALLOW_LOCK: Allow camera locking
  • UAV_PhP_GCS_AUTO_ACTIVATE: Activate on vehicle entry
  • UAV_PhP_GCS_AUTO_ORBIT: Enable auto orbiting
  • UAV_PhP_GCS_CHANGE_TARGET: Relocate locked target
  • UAV_PhP_GCS_COORD_TYPE: Coordinate type used
  • UAV_PhP_GCS_ENABLE_RECORD: Enable video recording
  • UAV_PhP_GCS_MARK_TARGETS: Can mark targets on map
  • UAV_PhP_GCS_MINIMAP: Enable mini-map
  • UAV_PhP_GCS_RECORD_FRAMES: Video resolution FPS
  • UAV_PhP_GCS_RECORD_RESOLUTION_X: Video resolution in X
  • UAV_PhP_GCS_RECORD_RESOLUTION_Y: Video resolution in Y
  • UAV_PhP_GCS_RECORD_UI: Record video
  • UAV_PhP_GCS_SHOW_HINTS: Show hints
  • UAV_PhP_GCS_TYPE: Type of control station
  • UAV_PhP_GCS_ULINK: Array with unit(s) linked to station
  • UAV_PhP_GCS_VLINK: Vehicle linked to station

Editor

  • DESCRIPTION: The object's description value, as set in the object's definition form.
  • NOTVISIBLEINEDITOR (Boolean): Whether an object is shown in the editor (2D view & ObjectTree).
    Variable must be set before editor is opened; changing its value after the editor has been opened does not change its visibility.

Glint Objects

  • FORCED (Boolean): If true, then glint will always be visible
  • CONDITION (String): Condition that must be fulfilled (in addition to either "FORCED" being true or player within visibility limits) for glint to be visible
  • FOV_DIR (Number): Direction from which glint is visible
  • FOV (Number): Angle within glint is visible
  • DRAW (Boolean): Whether to show glint visibility angle in editor
  • GLINT_ON (Boolean): Whether the glint is currently visible to player

Groups

  • EDITOR_DESC: Group description given in edit window
  • WAYPOINT_BRANCH_CFG: If group is on a branched waypoint, that WP is returned as an Editor Object

IEDs

  • ATTACH_TO: Object IED is attached to
  • ATTACHED_IED: IED that is attached to object (variable is assigned to the object, not the IED)
  • ATTACHED_TRIGGERS: Trigger attached to IED
  • BOOBY_TRAP: Booby trapped?
  • CAN_BE_JAMMED: Can be jammed?
  • CHARGE: Ammo type to explode when triggered
  • DAISY_CHAIN: Array of IEDs that are daisy-chained
  • DISARM_DURATION: Disarm duration in seconds
  • EXPLOSION_TYPE: Explosion type ('normal', 'wounding' or 'fake')
  • IED_CONDITIONS: Array with conditions that have to be true for IED to detonate
  • NAME: Name given in IED edit window
  • ON_EXPLODE: Code that's executed when IED detonates
  • PRESSURE_PLATE: Command executed when pressure plate is triggered
  • PRESSURE_PLATE_A: Width of pressure plate
  • PRESSURE_PLATE_B: Height of pressure plate
  • PRESSURE_PLATE_WEIGHT: Trigger weight for pressure plate
  • PRESSURE_PLATE_X: X-offset for pressure plate
  • PRESSURE_PLATE_Y: Y-offset for pressure plate
  • PROXIMITY: Trigger type: 'Proximity', 'PressurePlate' or 'Admin'
  • PROXIMITY_DIS: Proximity distance
  • PROXIMITY_SIDE: Proximity side
  • PROXIMITY_TRIGGER: Trigger attached to IED, if of proximity type

Inventory

  • WEIGHT_CAPACITY: Maximum carrying capacity of a container in kg.
    If not set, capacity is read out of config. If set to 0, then unlimited. Applies to units, vehicles, and containers.
  • INV_CARRIED (Array): with the objects currently being carried by a unit.
  • INV_OBJCARGO (Array): with the objects currently in cargo of the unit/vehicle.

Popup Targets

  • VBS2_popup_hits (Number): The number of hits a popup target needs before it drops down.
  • VBS2_popup_time (Number): How many seconds a dropped popup target stays down before getting uprighted again.

Sandstorms

  • VBS2_SANDSTORM_RADIUS (Number): The radius of the sandstorm (in metres).
  • VBS2_SANDSTORM_COLOUR_RGB (Color): Sandstorm colour [R,G,B,A].
  • VBS2_SANDSTORM_DENSITY (Number): Relative density of the sandstorm.
  • VBS2_SANDSTORM_CEILING (Number): The height of the sandstorm (in metres).
  • VBS2_SANDSTORM_LOCALPFX (Boolean): Whether localised particle effects are switched on for the player.
  • VBS2_SANDSTORM_CAMERAPFX (Boolean): Whether localised particle effects are switched on for the camera.
  • VBS_SANDSTORM_WIND (Array): Holds the wind vector (somewhat randomised) that influences the sandstorm [X,Y,Z].
  • VBS2_SANDSTORM_LOCALPFX_SOURCE (Object): Holds the effect source of the localised particle effects.
  • VBS2_SANDSTORM_INBUILDING (Boolean): Wether the player is inside or not.
  • VBS2_SANDSTORM_HANDLER_RUNNING (Boolean): Whether the main handling loop for particle generation has been started or not.

Sound Source

These variables only exist for the Sound Source Editor Object, NOT the sound source object created via createSoundSource!

  • SoSoAnimRunning (Boolean): Returns true if the sound is currently playing.
  • SoSoCONDITION (String): Play condition.
  • SoSoNAME (String): The name that was given to the Sound Source in the property dialog.
  • SoSoPLACEMENT (Number): Placement radius
  • SoSoPRESCON (String): Presence condition.
  • SoSoSOURCE (Object): Sound source that was created by the editor object (1.60+).
  • SoSoTYPE (String): Class name of sound effect it is playing.

UGVs

  • TAL_PhP_charges (Number): Whether the UGV is carrying explosive charges (either 0 or 1).
  • TAL_PhP_chargePosition (Array with 2 elements): 1st element: IED a charge was attached to (or objNull if placed on ground), 2nd element: explosive charge that was placed.

Units

  • URN: The unit's URN callsign.
  • VBS2_CROWD_FORMATION (Boolean): Used to toggle civilians between standard formation (line, wedge, column, etc) and crowd formation. Only works on civilians. This is a tight, random "formation", keeps them off roads, and prevents them from running to catch up with their group - they will rather walk faster, but never run. Static groups (groups that have no waypoints) using this will cause the subordinates to walk around a bit within the radius of the group. The variable must be applied to the leader of the group where he is local, and not the subordinates. The leader of the group must not be the player, it must be AI since the code is FSM driven. Groups that use this variable currently are designed to not use the danger FSM, ie they will not flee from danger at this stage, whereas regular civilian AI do.
  • VBS2_FORCE_MOVE (Position3D): Defines destination for an civilian group member to move to, without falling back into formation. This is designed specifically for units using the VBS2_CROWD_FORMATION variable. It allows a mission designer to obtain full control of the movement of the AI in a way that works harmoniously with the VBS2_CROWD_FORMATION FSM. It it recommended that this variable is used instead of conventional scripting commands to move AI around when they are using the VBS2_CROWD_FORMATION FSM. If set to nil, unit returns to formation.
  • vbs2_knockedOut (Boolean): Set to true if player is temporarily knocked out by "shell shock" effect, caused by nearby detonations.
    It set to true via script before the detonation, then no shell-shock will be applied to the player. (And the variable will not be reset to false, once the shell-shock duration is over.)

Vehicles

  • URN: The vehicle's URN marking.
  • URN_DIS: The vehicle's LVC URN marking.
  • VEH_ARCS: Gunner arc: [direction, opening angle]
  • vbs2_smokeDischarger: The number of times a vehicle can use its smoke discharger.
    Can not be used to add smoke to a vehicle that does not have a discharger already.

Waypoints

The variable has to be read from the group's waypoints. e.g.

{player sidechat str (_x getVariable "WAYPOINT_AIR")}forEach waypoints (group player)
  • WAYPOINT_AIR: For aircraft returns ["speed","elevation","speed mode","(unused)","agl/asl","loiter radius","loiter type"]
  • WAYPOINT_BRANCH: Branching information [[(unused)],branch condition,"next waypoint EO"]