Home   Help Search Login Register  

Author Topic: Helicopter script help  (Read 1310 times)

0 Members and 1 Guest are viewing this topic.

Ronin

  • Guest
Helicopter script help
« on: 13 Sep 2002, 06:36:27 »
Hi,
I've made this script that works well, but I want to see if you guys can help me make it better.

Here is the script

helo1 flyinheight 10
helo1 move getmarkerpos "way1"
@unitready helo1
helo1 setspeedmode "limited"
helo1 move getpos helipad
helo1 flyinheight 4
@unitready helo1
@(getpos transport select 2) < 5
~8
p1 exec "alphaexit.sqs"

@Not (p1 in helo1) AND not (p2 in helo1) AND not (p3 in helo1)
helo1 move getmarkerpos "way2"
Exit

Now what happends is that the helicopter helo1 comes in really low, hovers about 4 m above the ground while the soldiers jump out and then it flies off to another waypoint.

What I don't like is the need to wait 8 seconds before the soldiers jump.   I had to add this because the soldiers were jumping out before the helo reached the invisible helipad, and this being a coastal insertion they started jumping into the water.

I tried adding a line to detect when the distance between the helipad and the helicopter was less than 5 meters but that didn't work.

Does anyone know of a command I can use to make the soldiers wait until the helo is directly above the helipad rather than just in the approximate area before jumping out.

Thanks for any help,
Ronin

teeps

  • Guest
Re:Helicopter script help
« Reply #1 on: 13 Sep 2002, 11:26:15 »
Just a thought, but if the helo is flying at 4 metres, then looking for distance < 5 m will only be true over a very small area, as I think the distance measures not just horizontal seperation, but vertical too.  If you are after a 5m radius you may need to check for distance less than 6.4 metres (if my maths serves me well.

Helos = Pain in the Arse

Cheers,
Teeps

Gameer_77

  • Guest
Re:Helicopter script help
« Reply #2 on: 13 Sep 2002, 18:55:36 »
Can you not just use this:

@heliname distance Helipadname <10

 8)PEACE

Ronin

  • Guest
Re:Helicopter script help
« Reply #3 on: 14 Sep 2002, 06:52:46 »
Thanks for all your replies,
I'll try the first suggestion, because i've tried gameer_77's suggestion and they still bailed out early for some reason.   Might give it another go though.
Thanks,
Ronin

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:Helicopter script help
« Reply #4 on: 14 Sep 2002, 20:27:17 »
Check for the helicopters speed. 3-6 is really slow, and probably means the helicopter is close enough to it's destination. I recreated your mission from what you described at checking for the helicopters speed solved the problem with the ejection happening too soon.

@speed helo1 < 4
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

Ronin

  • Guest
Re:Helicopter script help
« Reply #5 on: 15 Sep 2002, 06:51:43 »
Thanks toadlife i'll try that straight away.

Ronin