Home   Help Search Login Register  

Author Topic: Force plane take off  (Read 462 times)

0 Members and 1 Guest are viewing this topic.

Offline DarkAngel

  • Members
  • *
  • The night is my friend.
    • DarkAngels Missions
Force plane take off
« on: 13 Oct 2003, 01:16:19 »
Hi folks.

I'm currently designing a mission on STT desert Malden where you're trying to kill a terrorist leader in a camp way out in the desert. One idea I had is that the leader will try to make an escape in a Cessna. I've tried doing this in the editor but all that happens is the guy gets in the plane, then turns around a bit, then stops. Is there a scripting guru out there who can either a) con the AI into thinking there's a runway there or b) find a cunning way of using setvelocity or something to simulate aircraft takeoff?

Cheers
Dark
"Moondark" in Beta Testing

Uldics

  • Guest
Re:Force plane take off
« Reply #1 on: 30 Nov 2004, 06:58:27 »
Make a file called takeoff.sqs and copy following in it:

_plane = _this
_startingdirection = direction _plane
_a=0

#takeoff
_a=_a+1
_plane setvelocity [(sin direction _plane)*2.5*_a,(cos direction _plane)*2.5*_a,0]
_plane setdir _startingdirection
~.125
? (_a<30) : goto "takeoff"

_plane setvelocity [(sin direction _plane)*2.5*_a,(cos direction _plane)*2.5*_a,_a/8]
_plane action ["Engine on"]




Then call it just like that:

myplane exec "takeoff.sqs"