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


Introduced in

Version:3.3

Description

Description:Forces the selected units to fire at a designated area (using a radio command).

Units only fire, if the target position can be reached (there are no obstacles between them and the position). There do not have to be OPFORs in the target area for the AI to fire - as long as the target position can be hit, the units open fire.

Only affects infantry units. Vehicle gunners do not fire. Group leaders (even if infantry) also do not fire. An active suppressive fire order can be cancelled by either executing a new one, with a time limit of 0, or by issuing a "Back to formation" order to the group members.

Syntax

Syntax:commandSuppressiveFire [pos, dir, pitch, size, show, color, shooters, time, ammo, mags, mode, aim]
Parameters:
  • pos: PositionASL - Center of target box.
  • dir: Vector3D - vectorDir or target box.
  • pitch: Vector3D - vectorUp or target box.
  • size: Array - [x,y,z] size (in meters) of target box.
  • show: Boolean - If true, then target box and aiming paths are visible to the group leader (even if not in editor mode). If false, then these indicators are only visible in the editor and AAR.
  • color: Color - Color of target box.
  • shooters: Array - Units that should fire at the target.
  • time: Number - Maximum time (in seconds) to fire at the target, -1 disables time limit. 0 stops ongoing fire (optional, default: -1).
  • ammo: Number - Maximum ratio of ammunition that should be used (0-1), -1 disables ammunition limit (optional, default: -1).
  • mags: Number - Maximum number of magazines that should be used, -1 disables magazine limit (optional, default: -1).
  • mode: Number - Firing mode to use (optional, default: 2). Possible values:
    • 0: Single only
    • 1: Burst only
    • 2: Random switching between single and burst mode
    • 3: Auto only
  • aim: Number - Whether each unit should find one random position to fire at continuously (0), or whether, at random intervals, a new target should be chosen (1). (optional, default: 1).
Return Value:Number - Index of suppressive fire order (to be used with getSuppressiveFire).

Examples

Examples:
Causes all units in the mission to fire at a 3x3x3 area that is 20m in front of the player.
The target box is colored red, and visible to the player:
_pos = convertToASL(player modelToWorld [0,20,1]);
commandSuppressiveFire [_pos,[0,1,0],[0,0,1],[3,3,3],true,[1,0,0,.5],allUnits]

Additional Information

See also: getSuppressiveFire, doSuppressiveFire, allSuppressiveFires, suppressFor, commandObservation, fire
Multiplayer: 
Problems: 

Notes