Airstrike script; How do you make the planes drop bombs?

ArmA editing, missions, modeling, textures, terrains

Moderators: Lone Wolf, Snake Man

Post Reply
bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Airstrike script; How do you make the planes drop bombs?

Post by bigstone » 2008-08-06 03:23:14

The line says it all fellas. I don't know what to do I add a way point for a plane to destroy and make it to open fire at will. When in game all I see is the plane fly through the air pass the ground target and nothing? Its like watching a air show? :(

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2008-08-06 06:12:16

For short answer, try the Mandoble bombs and air support console scripts.

The long answer is by script to order the plane to fly into target point, then when its unitReady true, drop the bombs by using the fire command. However this method is not very accurate as you have to "lead" the target point etc.

This is one example airstrike script initially made by Skumball.

Code: Select all

onMapSingleClick {false};

2 setradiomsg "null";

_pos = _this select 0
[_pos, "TARGET AT GRID COORDINATES ", ". OVER.", ["SideChat", player]] exec "gridcoordinates_pipe.sqs";
"target" setMarkerPos _pos
"target" setMarkerType "destroy"

strikePlane = "JAM_A10lgbHD" createvehicle (getMarkerPos "spawn")
strikePlane setPos [(getPos strikePlane select 0),(getPos strikePlane select 1),(getPos strikePlane select 2)+800]
strikePlane setDir 100

strikePilot assignAsDriver strikePlane
strikePilot moveInDriver strikePlane
strikePilot doMove _pos
~5

strikePilot sidechat "ON MY WAY. OVER."

@ unitReady strikePilot
strikePilot sidechat "BOMBS AWAY! BOMBS AWAY!"

_num = 4
_i = 0

#loop
_bomb = "laserGuidedBomb" createvehicle [(getPos strikePlane select 0)+((random 10)-7),(getPos strikePlane select 1)+((random 10)-7),(getPos strikePlane select 2)-5]
_bomb setDir (getDir strikePlane)
_bomb setVelocity [(velocity strikePlane select 0)*0.2,(velocity strikePlane select 1)*0.2,(velocity strikePlane select 2)*0.2]
_i = _i + 1
~0.3
? _i < _num : goto "loop"

strikePilot doMove (getMarkerPos "spawn")
strikePilot sidechat "RETURNING TO LOITER POS."

"target" setMarkerType "empty"

@ unitReady strikePilot
deleteVehicle strikePlane
if (!alive strikePilot) then { strikePilot setdammage 0; };
strikePilot setVelocity [0,0,0]
strikePilot setPos (getMarkerPos "safe")

if (PMCastrk < 3) then { PMCastrk=PMCastrk+1; 2 setradiomsg "Call - Airstrike"; strikePilot sidechat "A-10 READY FOR TASKING. OVER."; };

exit
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests