I have a script ready made for the Tonka.
It appears in this mission if you want to see it in action.
First Light
http://www.freewebs.com/ofpbob/mymissionspart2.htm;Airstrike (map click) v1.2
;by Skumball (simongoddard4@yahoo.co.uk)
;Modified by The-Architect (The_arch@hotmail.com)
;Needs listed sounds to work with audio.
;
;Thanks to Viriato for making the bombs fall correctly and LCD for incorporating the script into the radio
;
;Requires:
;OFP v1.85
;1 Pilot named "strikePilot"
;3 Markers ("spawn","safe","target" all set to 'empty')
;1 Trigger (Activation: Radio Alpha, Repeatedly. Text: Air Strike. On Activation: onMapSingleClick {[_pos] exec "airstrike.sqs"}; strikePilot sideChat "Give me a target.")
;
;Have a look at the sample mission to see how it works
;Change the value of _num, *0.2 and ~0.2 for different results
?(airstrikecounter >= 3): exit
; more than three [air]strikes and you're out - just an insurance policy
airstrikecounter = airstrikecounter + 1
; use up a strike
onMapSingleClick {}
1 setRadioMsg "Null"
_pos = _this select 0
"target" setMarkerPos _pos
"target" setMarkerType "destroy"
strikePlane = "ITA_TRD_RAF_BHD14_KEY" camCreate (getMarkerPos "spawn")
strikePlane setPos [(getPos strikePlane select 0),(getPos strikePlane select 1),(getPos strikePlane select 2)+800]
strikePlane setDir 180
strikeplane flyinheight 75
strikePilot assignAsDriver strikePlane
strikePilot moveInDriver strikePlane
strikePilot doMove _pos
strikePilot sideChat "Roger. On the way."
playsound "onway"
@ unitReady strikePilot
strikePilot sideChat "Bombs gone."
playsound "gone"
_num = 4
_i = 0
#loop
_bomb = "ITA_Mk82HD_RAF" camCreate [(getPos strikePlane select 0)+((random 10)-5),(getPos strikePlane select 1)+((random 10)-5),(getPos strikePlane select 2)-3]
_bomb setDir (getDir strikePlane)
_bomb setVelocity [(velocity strikePlane select 0)*0.1,(velocity strikePlane select 1)*0.1,(velocity strikePlane select 2)*0.1]
_i = _i + 1
~0.15
? _i < _num : goto "loop"
strikePilot doMove (getMarkerPos "spawn")
~3
strikePilot sideChat "Heading back. Over."
playsound "heading"
"target" setMarkerType "empty"
@ unitReady strikePilot
deleteVehicle strikePlane
strikePilot setVelocity [0,0,0]
strikePilot setPos (getMarkerPos "safe")
?(airstrikecounter >= 3): goto "nomorestrikes"
; three or more [air]strikes we jump over the SetRadioMsg so it's NOT reset making further airstrikes unavailable
; if less than three, carry on . . .
strikePilot sideChat "I'm ready for another run. Over."
playsound "run"
1 setRadioMsg "Air Strike"
exit
#nomorestrikes
strikePilot sideChat "Heading back. Over."
playsound "heading"
~5
hint "Tornado has Returned to base."
exit
Put this line in the init of your player.
; airstrikecounter = 0
Put the sound files in your mission folder in another folder you've created called Sound.
Add all the sound files to your Description.ext
How to use the script.
Create a pilot. Call him,
StrikePilot
Create an empty marker called Spawn. Place it on the map a distance from your mission area. The Tornado will fly from this point.
Create an empty marker called Safe. Place it near the Spawn marker. This is where the Tornado will go after the run.
Create an empty marker called Target. This is the marker which will appear when you click on the map.
Create a Trigger with these settings.
Activation: Radio Alpha, Repeatedly.
Text: Air Strike.
On Activation: onMapSingleClick {[_pos] exec "airstrike.sqs"}; strikePilot sideChat "Give me a target."
In the effects tab select the sound file called "Target"
Save it and preview the mission. You should then be able to call an airstrike.
[attachment deleted by admin]