setfire=true;
titleText ["Click on the map to set your firedirection","plain down"];
onMapSingleClick "ASTarget setPos _pos;setfire=false";
@!setfire;
"firedirection" setMarkerPos getPos ASTarget;
playSound "Firedirection";
onMapSingleClick "";
titleText ["","plain down"];
;===DEFINE===
_dropPosition=getPos ASTarget;
~5
_dropPosX= _dropPosition select 0;
_dropPosY= _dropPosition select 1;
_dropPosZ= _dropPosition select 2;
~0.1
_planespawnpos=[_dropPosX+3000,_dropPosY,_dropPosZ+1000];
_pilotpawnpos=[_dropPosX+3000,_dropPosY,_dropPosZ+1000];
;===CREATE===
_PlaneG=createGroup WEST;
_plane=createVehicle ["AV8B",_planespawnpos,[],0,"FLY"];
_plane setpos [(getPos _plane select 0),(getPos _plane select 1),900];
_pilot="SoldierWPilot" createUnit [getMarkerPos "Firedirection",_PlaneG,"P1=this"];
_plane setVelocity [100,0,0];
~0.4
P1 moveinDriver _plane;
P1 setDamage 0;
P1 action ["gear_up",vehicle P1];
_plane flyinHeight 100;
_plane setSpeedMode "full";
#CHCK
P1 doMove getPos ASTarget;
P1 doTarget ASTarget;
P1 doWatch ASTarget;
?(_plane distance ASTarget)<1500:goto "DROP"
goto "CHECK"
;===FIRE===
#DROP
_i=0
_plane FlyInHeight 100;
_plane setPos [(getPos _plane select 0),(getPos _plane select 1),100];
~13
#FIRE
_i=_i+1
_plane fire "Bomblauncher";
~0.2
?_i<=6:goto "FIRE"
;===FLY AWAY===
ASTarget setpos [0,0,0];
"Fierdirection" setMarkerPos [0,0];
_plane setSpeedMode "Full"
~4
_plane flyinHeight 300;
P1 doMove getPos ASTarget;
#CHECK2
_plane setDamage 0;
P1 setDamage 0;
?(_plane distance Player)>2500:goto "END";
goto "CHECK2"
;===DELETE===
#END
deletevehicle _plane;
deleteGroup _PlaneG
deletevehicle P1;
exit |