MapKlick Arty gibt es wie Sand am Meer!
Hier ein Beispiel:
(ob es in A1 läuft, keine Ahnung. Probieren)
Code:
//*****************************************************************************************************
//
//**************************************** Ari Script von Drunken Officer *****************************
//
//**** 0=[[anzahl,radisu,wirkung],[mindistanz, maxdistanz],nachladezeit,true/false] execVM "DOF_phantomari_v2.sqf";
//
private ["_DOFANZ", "_DOFRAD", "_DOFWIR", "_DOFMIN", "_DOFMAX", "_DOFRELAOD", "_DOFARRAY", "_DOFTYP", "granate", "_DOFSIDE", "_DOFMKR"];
if (!isServer) exitWith {};
_DOFARRAY = ["GrenadeHand", "r_60mm_he","r_80mm_he","Bo_Mk82_MI08", "Bo_Mk82", "Bo_GBU12_LGB"];
// mit den entsprechenden Klassen aus A1 ersetzen
_DOFANZ = (_this select 0) select 0;
_DOFRAD = ((_this select 0) select 1) / 2;
_DOFWIR = (_this select 0) select 2;
_DOFMIN = (_this select 1) select 0;
_DOFMAX = (_this select 1) select 1;
_DOFRELAOD = _this select 2;
_DOFSIDE = Side Player;
_DOFMKR = _this select 3;
if (isNil "dof_ariphantomanforderung_v2") then {dof_ariphantomanforderung_v2 = false};
if (isNil "_DOFANZ") then {_DOFANZ = 10};
if (isNil "_DOFRAD") then {_DOFRAD = 100};
if (isNil "_DOFWIR") then {_DOFWIR = 2};
if (isNil "_DOFMIN") then {_DOFMIN = 150};
if (isNil "_DOFMAX") then {_DOFMAX = 750};
if (isNil "_DOFRELAOD") then {_DOFRELAOD = 300};
if (isNil "_DOFMKR") then {_DOFMKR = true};
if (_DOFMIN >= _DOFMAX) exitWith { titletext [format ["Maximalabstandsparameter zu klein. Es muss größer %1 Meter sein",_DOFMIN],"PLAIN"]; DOF_ariphantomziel_v2 = nil;};
if (dof_ariphantomanforderung_v2) exitWith {[_DOFSIDE, "HQ"] commandChat "Angriff läuft bereits bzw. Artillerie ist am Nachladen";};
//****** öffnet die Karte ***********
openMap [true, false];
titleText ["Senden sie die Koordinaten (Einfack-Klick auf Karte)","PLAIN",1];
onMapSingleClick "DOF_ariphantomziel_v2 = _pos; dof_ariphantomanforderung_v2 = true; onMapSingleClick ''; true;";
waitUntil {sleep 1; !visibleMap || dof_ariphantomanforderung_v2};
if (!dof_ariphantomanforderung_v2) exitWith
{titleText ["","PLAIN",0.5];
DOF_ariphantomziel_v2 = nil;
hint "Unterstützunganforderung abgebrochen";
onMapSingleClick "";
};
if (player distance [DOF_ariphantomziel_v2 select 0, DOF_ariphantomziel_v2 select 1, 0] > _DOFMAX) exitWith
{
titletext [format ["Entfernung zum Ziel zu gross naehern Sie sich dem Ziel bis auf %1 Meter",_DOFMAX],"PLAIN"]; DOF_ariphantomziel_v2 = nil; dof_ariphantomanforderung_v2 = false; openmap [false, false];
};
if (player distance [DOF_ariphantomziel_v2 select 0, DOF_ariphantomziel_v2 select 1, 0] < _DOFMIN) exitWith
{
titletext ['Entfernung zum Ziel zu gering, eigene Einheit in Gefahrenzone','PLAIN']; DOF_ariphantomziel_v2 = nil; dof_ariphantomanforderung_v2 = false; openmap [false, false];
};
//**** Arischlage beginnt ****
[_DOFSIDE, "HQ"] commandChat "Artilleriefeuer beginnt";
hint format ["Artillerie feuert auf Kooridanten \n %1 \n %2", (DOF_ariphantomziel_v2 select 0), (DOF_ariphantomziel_v2 select 1) ] ;
_hz = "Land_HelipadEmpty_F" createVehicle DOF_ariphantomziel_v2;
if (_DOFMKR) then
{
//*********** erstellt Marker und Hilfziel ************
createMarker ["Zielmarker", position _hz ];
"Zielmarker" setMarkerShape "ICON";
"Zielmarker" setMarkerType "mil_warning";
"Zielmarker" setMarkerText "Artilleriebeschuss";
"Zielmarker" setMarkerColor "ColorRed";
//******************************************************
};
titleText ["","PLAIN",1];
sleep 15 + random 10;
for "_x" from 1 to _DOFANZ do
{
_DOFTYP = _DOFARRAY select _DOFWIR;
_granate = createVehicle [ _DOFTYP, [getPos _hz select 0, getPos _hz select 1, 0],[], _DOFRAD, 'FLY'];
[_granate,-90,0] call BIS_fnc_setPitchBank;
sleep 2 + random 3;
};
deleteVehicle _hz;
if (_DOFMKR) then { deleteMarker "Zielmarker"; };
[_DOFSIDE, "HQ"] commandChat "Ari-Unterstützung abgeschlossen";
DOF_ariphantomziel_v2 = nil;
sleep _DOFRELAOD;
dof_ariphantomanforderung_v2 = false;
ZU der Varibale: Puderzucker war in dem Beispiel die Variable. Der Editor will halt eine haben.