Home   Help Search Login Register  

Author Topic: Heli landing  (Read 524 times)

0 Members and 1 Guest are viewing this topic.

j-man

  • Guest
Heli landing
« on: 04 Dec 2003, 03:16:40 »
Is there anyway to make a helicopter land nomatter what?  ???

Like if there are trees or vehicles under the helicopter the heli would still land.


m21man

  • Guest
Re:Heli landing
« Reply #1 on: 04 Dec 2003, 03:23:06 »
You could try:
Code: [Select]
chopper flyinheight 0
Or there's this ::) :
Code: [Select]
chopper setfuel 0

deaddog

  • Guest
Re:Heli landing
« Reply #2 on: 04 Dec 2003, 03:23:44 »
Why would you want to do that?

Try:

heliname flyinheight 0

or

heliname setfuel 0

edit***

lol, I see we think alike m21man  ;D
« Last Edit: 04 Dec 2003, 03:24:59 by deaddog »

m21man

  • Guest
Re:Heli landing
« Reply #3 on: 04 Dec 2003, 03:25:14 »
Stop reading my mind :o ;D !
« Last Edit: 04 Dec 2003, 03:27:06 by m21man »

cliff

  • Guest
Re:Heli landing
« Reply #4 on: 04 Dec 2003, 03:30:21 »
or something like this, syntax not guaranteed:
call this script where you want it to land, with [heli] exec "land.sqs"

heli=this select 0

#land
heli setpos [(getpos heli select 0), (getpos heli select 1),(getpos heli select 2) -0.5)]
?((getpos heli select 2)=0):goto end
goto land
#end

like i said, no guarantees

m21man

  • Guest
Re:Heli landing
« Reply #5 on: 04 Dec 2003, 03:55:03 »
I think that would be:
Code: [Select]
_heli=_this select 0

#land
_heli setpos [(getpos _heli select 0), (getpos _heli select 1),(getpos _heli select 2) -0.5)]
?((getpos _heli select 2)=0):goto "end"
goto "land"
#end
exit
Just some syntax corrections :) .

Edit - Added exit command.
« Last Edit: 04 Dec 2003, 03:55:34 by m21man »

deaddog

  • Guest
Re:Heli landing
« Reply #6 on: 04 Dec 2003, 04:24:08 »
I think you will find that the heli will be slammed into the ground almost instantly.  There is no time delay in the loop.  Even if you do slow it down, it will look "jerky" because of the setpos in .5 meters steps.

Also, a heli on the ground will not report its height exactly at zero.

And just to be extremely picky  ;D

should be:  ?((getpos _heli select 2)==0):goto "end"

m21man

  • Guest
Re:Heli landing
« Reply #7 on: 04 Dec 2003, 04:27:05 »
The problem with that script is that in order for it to be smooth, you'd need to move the chopper down in infinitesimal increments in one huge group of loops. It's much more efficient to force the chopper to land by making it fly at 0 altitude.

Edit - Remember that using flyinheight will cause the chopper to keep its rotors turning when the chopper is parked.
« Last Edit: 04 Dec 2003, 04:28:33 by m21man »

cliff

  • Guest
Re:Heli landing
« Reply #8 on: 04 Dec 2003, 14:46:37 »
I wrote it in a hurry so sorry for those errors. However, it can be done with a nice look to it using smaller intervals. IÂ've used a similar thing to make AI pilots take off and land from the LSD ship, and that actually looks REALLY cool. No notable "choppyness" on the choppers... ;D