Arma 3
Pook ARTY Pack
hcpookie  [developer] 30 May, 2019 @ 6:53pm
SRBM Function - call in precision missile strike
/********* pook_ARTY SRBM AI Fire Mission Function **************************************************

Initiates player-requested SRBM fire mission for friendly SRBM launchers. Can be scripted
for mission-driven "RED DAWN" or "SEARCH AND DESTROY" SRBM fire missions (e.g. "Stop General
Guba before he launches the missiles" type missions).

Author: hcpookie

Arguments:
==========
0: The player calling the mission
1: The SRBM ammo type being requested (OPTIONAL: default = HE)
2: Range (in km) to check for friendly launchers (OPTIONAL: default = 20)
3: OPTIONAL: Map grid coordinates for first salvo. Uses standard coordinate format (ex. [0,0,0]).
4: OPTIONAL: Map grid coordinates for second salvo. Uses standard coordinate format (ex. [0,0,0]).

USAGE:
======
1. Place AI SRBM launcher via editor, or spawn within mission. The function supports types:
- pook_9K720
- pook_9K720K
- pook_K300P
- pook_4K51
- pook_3K60
- pook_9K52
- pook_BGM109_VLS

2. Either "addAction" for desired ammo type to a Commander/Spotter/Radio operator, etc. Note
that the ammo type values are CASE-SENSITIVE: you must use "HE" and not "he"


HE:
----
this addAction ["SRBM Mission", {[player, "HE", 20] spawn pook_ARTY_FNC_SRBMMISSION},"",1,false,true];
- or -
this addAction ["SRBM Mission", {[player] spawn pook_ARTY_FNC_SRBMMISSION},"",1,false,true];
- or -
this addAction ["SRBM Mission", {[player, "HE, 20, [7088.1,3146.17,0]] spawn pook_ARTY_FNC_SRBMMISSION},"",1,false,true];

CBU:
----
this addAction ["SRBM Mission", {[player, "CBU", 15] spawn pook_ARTY_FNC_SRBMMISSION},"",1,false,true];

5KT: (use either "5KT" or "NUK")
----
this addAction ["SRBM Mission", {[player, "5KT", 5] spawn pook_ARTY_FNC_SRBMMISSION},"",1,false,true];

... You may replace "player" with the object's "Variable Name" (in the editor) depending on your scripting needs.

... Or via trigger/script for the artillery vehicle:

_launch = [this, "HE"] spawn pook_ARTY_FNC_SRBMMISSION;

3. OPTIONAL: The third input parameter defines the search radius to seek friendly launch-capable SRBM
launchers. Default is 20km. This can be adjusted to accommodate multiple launchers in the same mission. For example, if a specific artillery unit must be used by a specific team, they can be placed so that the search only finds them vs. any other artillery units that may be planned for use in the mission at a later point.

4. OPTIONAL: Map grid Coordinates for first salvo. Uses standard coordinate format (ex. [0,0,0]). May be used for scripting purposes.
If not found, operator will prompted for map-click coordinates (for both salvos).

5. OPTIONAL: Map grid Coordinates for second salvo. Uses standard coordinate format (ex. [0,0,0]). May be used for scripting purposes.

6. AI will ready the launcher (raise launch tubes), arm and launch the missile.

7. This script has no Rearm option! Launcher rearm can only be achieved via rearm vehicles.


RETURN:
=======
- AI will send sideRadio and sideChat notices confirming fire
mission or reporting status if out of ammo, or no friendly
SRBM launchers are in the area (default 20km zone)

NOTES:
======
- Cannot be used for human-controlled launchers.
- Launch command cannot be aborted!
- The SRBM launcher is calibrated to Real World values, and can launch anywhere between 1-300km
- Assumes multi-silo launcher is in use, and therefore employs a 2-missile launch procedure.
Single-silo launchers or launchers with partially depleted magazines may cause non-critical
in-game errors if there are no missiles to fire at the 2nd target coordinate.

*****************************************************************************************************/
Last edited by hcpookie; 24 Jun, 2020 @ 6:02am
< >
Showing 1-2 of 2 comments
hcpookie  [developer] 10 Aug, 2019 @ 2:43pm 
NOTE: I've improved the fire mission function and the nuke scripts should work much better now.

ALSO: You can use either "NUK" or "5KT" for the nuke fire mission now.
MOJIb 25 Feb, 2022 @ 1:26am 
Kinldy ask you to post an example of code to input into init field. (for HE MRBM Iskander)
< >
Showing 1-2 of 2 comments
Per page: 1530 50