OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pazuzu on 22 Apr 2005, 00:20:58

Title: Detect height
Post by: pazuzu on 22 Apr 2005, 00:20:58
How do I detect height of an aircraft so I can use that height as a condition?

Thanks.
Title: Re:Detect height
Post by: Blanco on 22 Apr 2005, 00:32:05
Code: [Select]
?getpos myplane (select 2) < 50
Title: Re:Detect height
Post by: CopyrightPhilly on 22 Apr 2005, 02:41:58
?(getpos myplane select 2) < 50: dowhateverhere

replace myplane with the name of the plane, 50 is what ever height u want it to detect....
Title: Re:Detect height
Post by: pazuzu on 22 Apr 2005, 03:14:54
Thanks I got it working.  Just had to change it a bit but that was easy.

Typed it out like this: (getpos heli select 2) < 2

I'm using Helicopter Transport script by Skumball which is great but the engine stays on while it waits at whatever point player has directed it to so I wanted to add a couple triggers to stop engine by using setfuel command but I didn't want anyone stopping engine while chopper was high in air & crashing it. Thats why I needed the extra condition for chopper to be low.

Works great, thanks again.