OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: sharkattack on 18 Aug 2007, 11:22:08

Title: hold altitude
Post by: sharkattack on 18 Aug 2007, 11:22:08
how can i maintain the altitude of a chopper ? for use with halo script.

i can start it at any hight eg 2000 ft  using

this setPos[ getPos this select 0,getPos this select 1,2000 ]

but how do i prevent it from wanting to return to a lower altitude (about 500ft)   ???

many thanx
Title: Re: hold altitude
Post by: LCD on 18 Aug 2007, 11:31:54
use da flyInHeight (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=f#flyInHeight) command :D shud work

LCD OUT
Title: Re: hold altitude
Post by: sharkattack on 18 Aug 2007, 12:11:13
tried that before posting ... didnt work
the chopper always looses height
Title: Re: hold altitude
Post by: LCD on 18 Aug 2007, 12:14:24
probably cuz he still didnt turn his engin on nd stuff... mebe u cud do a constant setpos loop... in functions dey work fast so it may b unnoticable :D

LCD OUT
Title: Re: hold altitude
Post by: Mandoble on 18 Aug 2007, 13:30:47
Place the chopper flying in the map, into its init field:
Code: [Select]
this flyinHeight 1500;this setPos[getPos this select 0,getPos this select 1,1500];this doMove getPos this

flyinheight has no effect if not followed by a move command. Also 1500m ~ 1550m seem be to maximum allowable altitudes for choppers in ArmA.
Title: Re: hold altitude
Post by: sharkattack on 18 Aug 2007, 13:34:31
thanx mate i will try it    :good:

edit
====
Works a treat  .. thanx a million


@LCD
engine was on ..  helo was flying ok  just wasnt happy at that altitude