hob
Member-
Content Count
2 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout hob
-
Rank
Newbie
-
The Unsung MOD (Vietnam War) Arma 2 Release
hob replied to sgt_savage's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
How you get the uns_f100b to drop bombs through AI script. I can get the planes to fly over but no bomb delivery. Here is the script I am using: ;Note: You have to put an empty Heli-H on the map called "ASTarget", and you have to place a //marker called "Firedirection". ;If you want the Airstrike to hit a fixed position, just delete the ;setfire-part and put the "ASTarget" on the position that you want to hit. Hope it works... _player = player; setfire=true; titleText ["Click on map to send coordinates","plain down"]; onMapSingleClick "ASTarget setPos _pos; setfire=false"; @!setfire; "Firedirection" setmarkerpos getPos ASTarget; onMapSingleClick ""; titleText ["", "plain down"]; ;=========DEFINE======================= _dropPosition = getpos ASTARGET; ~0.1 _dropPosX = _dropPosition select 0; _dropPosY = _dropPosition select 1; _dropPosZ = _dropPosition select 2; ~0.1 ;Aircraft1 _planespawnpos = [_dropPosX -3000, _dropPosY, _dropPosZ + 200]; _pilotspawnpos = [_dropPosX -3000, _dropPosY, _dropPosZ + 200]; ~1.1 ;Aircraft2 _planespawnpos2 = [_dropPosX -3000, _dropPosY, _dropPosZ + 230]; _pilotspawnpos2 = [_dropPosX -3000, _dropPosY, _dropPosZ + 230]; ;=========CREATE======================= _PlaneG = creategroup WEST; _PlaneG2 = creategroup WEST; ~0.1 _plane = createVehicle ["uns_f100b",_planespawnpos,[], 0, "FLY"]; _plane setPos [(getPos _plane select 0),(getPos _plane select 1),200]; _pilot = "uns_Pil1" createUnit [getMarkerPos "Firedirection", _PlaneG, "P1=this"]; _plane setDir (getdir _player); _Plane setVelocity [220,0,0]; _PlaneG = [_plane,1] execvm "CA\Data\ParticleEffects\SCRIPTS\misc\aircraftvapour.sqf"; ~0.5 _plane2 = createVehicle ["uns_f100b",_planespawnpos2,[], 0, "FLY"]; _plane2 setPos [(getPos _plane2 select 0),(getPos _plane2 select 1),230]; _pilot2 = "uns_Pil1" createUnit [getMarkerPos "Firedirection", _PlaneG2, "P2=this"]; _plane2 setDir (getdir _player); _Plane2 setVelocity [220,0,0]; _PlaneG2 = [_plane2,1] execvm "CA\Data\ParticleEffects\SCRIPTS\misc\aircraftvapour.sqf"; ~0.1 ;Aircraft1 P1 moveinDriver _plane; P1 setDamage 0; P1 action ["gear_up", vehicle P1]; _plane setSpeedMode "FULL"; p1 setBehaviour "RED"; ;Aircraft2 P2 moveinDriver _plane2; P2 setDamage 0; P2 action ["gear_up", vehicle P2]; _plane2 setSpeedMode "FULL"; p2 setBehaviour "RED"; ~1 #CHECK ;hintsilent "Strafing with 30mm Anti-Personnel"; ;Aircraft1 _plane setVehicleAmmo 1; _plane fire "MK82"; ;Aircraft2 _plane2 setVehicleAmmo 1; _plane2 fire "MK82"; ;Aircraft1 _plane flyinheight 140; P1 doMove getPos ASTarget; P1 doTarget ASTarget; P1 doWatch ASTarget; P1 setBehaviour "RED"; ? (_plane distance ASTarget) < 1300 : goto "DROP" ;Aircraft2 _plane2 flyinheight 140; P2 doMove getPos ASTarget; P2 doTarget ASTarget; P2 doWatch ASTarget; P2 setBehaviour "RED"; ? (_plane2 distance ASTarget) < 1300 : goto "DROP" goto "CHECK" ;=========FIRE======================= #DROP _i = 0 ;Aircraft1 _plane flyinheight 100; ;Aircraft2 _plane2 flyinheight 100; #FIRE _i=_i+1 ;Aircraft1 _plane setVehicleAmmo 1; _plane fire "Uns_BombLauncher"; ;Aircraft2 _plane2 setVehicleAmmo 1; _plane2 fire "Uns_BombLauncher"; ;hintsilent "Bombs Dropped"; ~3 ;Aircraft1 ;p1 action ["useWeapon",vehicle _plane,driver vehicle p1,1]; ;Aircraft2 ;p2 action ["useWeapon",vehicle _plane2,driver vehicle p2,1]; ? _i <= 6 : goto "FIRE" ;=========FLY AWAY======================= ASTarget setPos [0,0,0]; "Firedirection" setMarkerPos [0,0]; ;Aircraft1 _plane setSpeedMode "FULL"; ;Aircraft2 _plane2 setSpeedMode "FULL"; ~5 P1 doMove getPos ASTarget; P2 doMove getPos ASTarget; #Check2 ;Aircraft1 _plane flyinheight 200; ;Aircraft2 _plane2 flyinheight 200; ;Aircraft1 _plane setDamage 0; _plane setVehicleAmmo 1; _Plane setFuel 1; P1 setDamage 0; ? (_plane distance Player) > 2500 : goto "ENDE" ;Aircraft2 _plane2 setDamage 0; _plane2 setVehicleAmmo 1; _Plane2 setFuel 1; P2 setDamage 0; ? (_plane2 distance Player) > 2500 : goto "ENDE" goto "Check2" ;=========DELETE======================== #ENDE hintSilent "'F100' is returning to base - over"; ;Aircraft1 deleteVehicle _plane; deleteGroup _PlaneG; deleteVehicle P1; ;Aircraft2 deleteVehicle _plane2; deleteGroup _PlaneG2; deleteVehicle P2; exitWith Plus I can get the uns_a1j to drop bomps but I would like to use the gau12 and rockets but I can't them too work either. Thanks in advanced. -
The Unsung MOD (Vietnam War) Arma 2 Release
hob replied to sgt_savage's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Is the auto aim feature turned off in this mod? Thanks