Mortar Strike - Theseus-Aegis/MissionTemplate GitHub Wiki
This page will explain the usage of the Mortar Strike function.
/*
* Author: Mike, Jonpas
* Orders mortars to fire on an area. Each round will be fired at a different point on a random marker provided.
* If amount is 0 then it will choose randomly between 1-8.
* Ammo types are: HE (0), Smoke (1), Illumination (2)
* This function also covers the CUP D30 Artillery.
*
* Call on the server.
*
* Arguments:
* 0: Mortar <OBJECT>
* 1: Marker Array <ARRAY>
* 2: Rounds to fire <NUMBER>
* 3: Ammo Type <NUMBER>
*
* Return Value:
* 0: ETA (seconds) <NUMBER>
* 1: Amount <NUMBER>
*
* Examples:
* [My_Mortar, ["My_Marker", "My_Marker_1"], 5, 0] call MFUNC(mortarStrike)
* [My_Mortar, GVAR(markerArray)] call MFUNC(mortarStrike)
*/
This function is designed for usage with the standard vanilla Mortar or the CUP D30 Artillery.
It takes the area of preplaced marker(s) and will randomly select a position within the area, each shot will choose a different location to target.
For amount of rounds fired if you enter 0 it will randomly select an amount from 1-8.
It can also fire HE, Smoke and Illumination rounds. By default it will fire HE.
Call only on the server
Example:
[My_Mortar, ["MyMarker"]] call TAC_Mission_fnc_mortarStrike;
Example without defaults and multiple positions
[My_Mortar, ["MyMarker", "MyMarker2"], 5, 0] call TAC_Mission_fnc_mortarStrike;