-
Notifications
You must be signed in to change notification settings - Fork 0
/
arty.sqf
33 lines (28 loc) · 864 Bytes
/
arty.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
posGot = false;
hint "Open the map and click where you want to fire."
onMapSingleClick "target setPos _pos; posGot = true; false";
@posGot;
onMapSingleClick "";
hint "";
? ! (getPos target inRangeOfArtillery [units group f1, "32Rnd_155mm_Mo_shells"]) : goto "OutOfRange"
f1 sideChat "Target location received. Ordnance inbound. Out."
{[_x] exec "artyFire.sqf"} forEach [f1, f2, f3, f4, f5, f6];
_eta = floor (f1 getArtilleryETA [getPos target, "32Rnd_155mm_Mo_shells"]);
_marker = createMarker ["m1", getPos target];
"m1" setMarkerType "mil_destroy";
"m1" setMarkerColor "ColorRed";
_i = 0;
#ETA
"m1" setMarkerText format ["Fire Target - ETA %1 s", _eta - _i];
_i = _i + 1;
~1
? _i < _eta: goto "ETA"
f1 sideChat "Splash. Out."
deleteMarker "m1";
goto "End";
#OutOfRange
hint "Location is out of range.";
~5
hint "";
#End
exit;