Thank you to both.
I have the sample script working fine (generating a soldier on map click), but am still getting an error on the airstrike script.
Here is what I have:
radio activation: onMapSingleClick "[_pos] exec 'airstrike.sqs';"
This seems to call the script now, and I am able to click on the map. As soon as I click on the map, I get the error:
onmapsingleclick
error onmapsingleclick: type code, expected string
But, it looks like it does start running the script. There is some sidechat, and some extra 'test #' that I put in for debugging. It looks like it runs "on the way", and "test 1". then stops.
Here is the code (slightly modified) from Scumbag's script:
onMapSingleClick {}
1 setRadioMsg "Null"
_pos = _this select 0
"target" setMarkerPos _pos
"target" setMarkerType "destroy"
strikePlane = "A10LGB" camCreate (getMarkerPos "spawn")
strikePlane setPos [(getPos strikePlane select 0),(getPos strikePlane select 1),(getPos strikePlane
select 2)+800]
strikePlane setDir 180
strikePilot assignAsDriver strikePlane
strikePilot moveInDriver strikePlane
strikePilot doMove _pos
strikePilot sideChat "On the way"
strikePilot sideChat "test 1"
@ unitReady strikePilot
strikePilot sideChat "Target aquired"
strikePilot sideChat "test2"
_num = 4
_i = 0
#loop
_bomb = "laserGuidedBomb" 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.2,(velocity strikePlane select 1)*0.2,(velocity
strikePlane select 2)*0.2]
_i = _i + 1
~0.2
? _i < _num : goto "loop"
strikePilot doMove (getMarkerPos "spawn")
strikePilot sideChat "Heading back"
"target" setMarkerType "empty"
@ unitReady strikePilot
strikePilot sideChat "in unitready"
deleteVehicle strikePlane
strikePilot sideChat "test 4"
strikePilot setVelocity [0,0,0]
strikePilot sideChat "test 5"
strikePilot setPos (getMarkerPos "safe")
strikePilot sideChat "test 6"
strikePilot sideChat "Ready"
1 setRadioMsg "Air Strike"
exit
Any more ideas?
Again, much thanks.