Jump to content
Sign in to follow this  
firehawk66

pilotless aircraft

Recommended Posts

Hi guys,

I'm trying to get Mr-Murrays airstrike to work on my test mission and I'm getting the aircraft spawning, but it just falls into the ground as if there is no pilot.

This is the script, which I have adjusted slightly. I basically changed the pilot classname for an Arma2 one and took out a 'Sperre' line that kept giving me a message that an airstrike was not available.

;Skript & Idea by Mr-Murray 2006

;mr-murray@bossmail.de

;www.mapfact.net

;www.mr-murray.de.vu

setfire=true

titletext ["Click on the map to set your firedirection","plain down"]

onMapSingleClick "ASTarget setpos _pos;setfire=false"

@!setfire

"Firedirection" setmarkerpos getpos ASTarget

onMapSingleClick ""

titletext ["","plain down"]

Playsound "Funk"

;=========DEFINE=======================

_dropPosition = getpos ASTarget

~0.5

_dropPosX = _dropPosition select 0

_dropPosY = _dropPosition select 1

_dropPosZ = _dropPosition select 2

~0.1

_planespawnpos = [_dropPosX, _dropPosY + 3000, _dropPosZ + 1000]

_pilotspawnpos = [_dropPosX, _dropPosY + 3000, _dropPosZ + 1000]

;=========CREATE=======================

~0.1

_plane = "AV8B" createvehicle _planespawnpos

_plane setpos [(getpos _plane select 0),(getpos _plane select 1),900]

_pilot = "USMC_Soldier_Pilot" createUnit [getmarkerpos "Firedirection", dummy,"pilot1=this"]

_Plane setVelocity [50,0,0]

~0.4

pilot1 MoveInDriver _plane

pilot1 setdamage 0

pilot1 action ["gear_up", vehicle pilot1]

_plane FlyInHeight 500

_plane SetSpeedMode "full"

#Check

pilot1 doMove getpos ASTarget

pilot1 dotarget ASTarget

pilot1 dowatch ASTarget

? (_plane distance ASTarget) < 1500 : goto "Drop"

goto "Check"

#Drop

~5.2

_plane FlyInHeight 400

_plane setpos [(getpos _plane select 0),(getpos _plane select 1),100]

~1.05

_plane fire "BombLauncher"

~0.1

_plane fire "BombLauncher"

~0.6

_plane fire "BombLauncher"

~0.1

_plane fire "BombLauncher"

~0.6

_plane fire "BombLauncher"

~0.1

_plane fire "BombLauncher"

_plane SetSpeedMode "normal"

~3

_plane FlyInHeight 600

pilot1 doMove getpos Dummy

pilot1 dotarget Dummy

#Check2

_plane Setdamage 0

pilot1 Setdamage 0

pilot1 MoveInDriver _plane

? (_plane distance ASTarget) > 2500 : goto "Ende"

goto "Check2"

#Ende

ASTarget setpos getpos Dummy

"Firedirection" setmarkerpos getpos Dummy

deletevehicle _plane

deletevehicle pilot1

setfire=false

exit

#Ende2

hintc "An airstrike is currently not available! Wait!"

exit

Any ideas would be appreciated.

Share this post


Link to post
Share on other sites

try this - i changed the pilot1 too _pilot, I think this was the problem..

;Skript & Idea by Mr-Murray 2006
;mr-murray@bossmail.de
;[url]www.mapfact.net[/url]
;[url]www.mr-murray.de.vu[/url]

setfire=true
titletext ["Click on the map to set your firedirection","plain down"]
onMapSingleClick "ASTarget setpos _pos;setfire=false"

@!setfire
"Firedirection" setmarkerpos getpos ASTarget
onMapSingleClick ""
titletext ["","plain down"]
Playsound "Funk"

;=========DEFINE=======================
_dropPosition  = getpos ASTarget
~0.5
_dropPosX = _dropPosition select 0
_dropPosY = _dropPosition select 1
_dropPosZ = _dropPosition select 2
~0.1
_planespawnpos = [_dropPosX, _dropPosY + 3000, _dropPosZ + 1000]
_pilotspawnpos = [_dropPosX, _dropPosY + 3000, _dropPosZ + 1000]

;=========CREATE=======================
~0.1
_plane = "AV8B" createvehicle _planespawnpos
_plane setpos [(getpos _plane select 0),(getpos _plane select 1),900]
_pilot = "USMC_Soldier_Pilot" createUnit [getmarkerpos "Firedirection", dummy,"pilot1=this"]
_Plane setVelocity [50,0,0]

~0.4
_pilot MoveInDriver _plane
_pilot setdamage 0

_pilot action ["gear_up", vehicle _pilot]

_plane FlyInHeight 500
_plane SetSpeedMode "full"

#Check
_pilot doMove getpos ASTarget
_pilot dotarget ASTarget
_pilot dowatch ASTarget
? (_plane distance ASTarget) < 1500 : goto "Drop"
goto "Check"

#Drop
~5.2
_plane FlyInHeight 400
_plane setpos [(getpos _plane select 0),(getpos _plane select 1),100]
~1.05
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
_plane SetSpeedMode "normal"
~3
_plane FlyInHeight 600

_pilot doMove getpos Dummy
_pilot dotarget Dummy


#Check2
_plane Setdamage 0
_pilot Setdamage 0
_pilot MoveInDriver _plane
? (_plane distance ASTarget) > 2500 : goto "Ende"
goto "Check2"


#Ende
ASTarget setpos getpos Dummy
"Firedirection" setmarkerpos getpos Dummy
deletevehicle _plane
deletevehicle _pilot

setfire=false
exit


#Ende2
hintc "An airstrike is currently not available! Wait!"

exit

Any ideas would be appreciated.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×