|Description:||Creates an artillery strike, as the one created in using the Artillery Strike Editor Object.|
In the alternative syntax, where fuses can be applied, the ammunition class must have the desired fuse type configured. For greater fuse / warhead customization, consider using the Off Map Fire Support Editor Object (V3.9.1+)
|Syntax:||[ammo, position, radius, rounds, guns, delay, reload, start, plane, planeDir, condition] call fn_vbs_artilleryStrike|
- ammo: String - Type of ordinance to fire. Can be:
- position: Position3D or String - Center of artillery strike. Can be a string, for grid coordinates.
- radius: Number - Maximum distance from the center where the ordinance is fired.
- rounds: Number - Number of rounds each gun fires.
- guns: Number - Number of guns that fire.
- delay: Number - Delay (in seconds) between each gun firing.
- reload: Number - Delay (in seconds) between volleys.
- start: Number - Delay (in seconds) before first strike (optional, default: 0).
- plane: String - Class name of plane to spawn, which delivers the payload (optional, default: "" - no plane) (V3.7+)
- planeDir: Number - Direction from which the delivery plane should approach from (optional, default: 0) (V3.7+)
- condition: String - Script command (or variable) which should return true, for the strike to start (optional, default: "true") (V3.7+)
|Syntax:||[position, ammunition, fuseType, fuseParam, dispDiam, numOfRounds, reloadTime, numOfGuns, delayGuns, delayFirstShot] call fn_vbs_artilleryStrike (V3.9.1+)|
- position: Position-2 - Center of the artillery strike.
- ammunition: String - Ammunition class.
- fuseType: String - Type of fuse. For example, "proximity", "nearsurface", "timed" (optional, default: "").
- fuseParam: Number - Fuse parameter, depends on fuse type. For "proximity" fuse, the distance is between 3-13 meters. For "nearsurface", the distance is 3 meters. For "timed", the time (in seconds) from ammunition creation (optional, default: nil, only applied if fuse type is valid).
- dispDiam: Number - Dispersion diameter of impact area. The shot falls in a random position within a circular area (optional, default: 0).
- numOfRounds: Number - Number of rounds to fire by each gun in the battery (optional, default: 1).
- reloadTime: Number - Time in seconds for each gun to reload (optional, default: 0).
- numOfGuns: Number - Number of guns in the battery (optional, default: 1).
- delayGuns: Number - Delay in seconds between one gun and the next. Also, the time between the first shot of each gun (optional, default: 0).
- delayFirstShot: Number - Delay until the first shot is created (optional, default: 0).
When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.
["arty_105_he", getpos player, 100, 3, 3, 3, 6, "vbs2_gb_raf_gr4", 180, "!(alive tank1)"] call fn_vbs_artilleryStrike;
// Creates a 2 gun barrage of 81mm mortar fire, using HE warheads, proximity fuses. Set to a 10m airburst, within a 30m diameter circle around the target position. Each gun fires 5 rounds, takes 5 seconds to reload, and has a 2 second delay between shot the first shot is created 5 seconds after the function is executed.
[getPosASL2 target, "vbs2_ammo_Sh_81_HE_m372", "proximity", 10, 30, 5, 5, 2, 2, 5] call fn_vbs_artilleryStrike
|See also:|| fn vbs fireSupport, fn vbs createIED, fn vbs createComplexIED |