OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: supergruntsb78 on 23 Feb 2005, 03:42:08

Title: getting a units height
Post by: supergruntsb78 on 23 Feb 2005, 03:42:08
i have been seaching as an idiot (probably missed it as an idiot too) but i cant seem to find anything about getting a units height

what i need is a command to check the height of a helicopter and when he reaches a certain height (in this case < 2) (troops getting in ) it needs to activate a text (lets go guys come on lets go go go !!! )


could anybody help me please ? pretty pretty please ??


 
Title: Re:getting a units height
Post by: Triggerhappy on 23 Feb 2005, 04:29:47
?(getpos heli select 2) < 2: "text stuff"

where heli is chopper name and, well i HOPE you can figure out what "text stuff" is  ;D
Title: Re:getting a units height
Post by: supergruntsb78 on 23 Feb 2005, 13:36:06
thanks  and yes i can figure out what the text stuff means  (i hope as offcourse im an idiot  :P)
Title: Re:getting a units height
Post by: StonedSoldier on 23 Feb 2005, 13:38:52
using if would be fine if you wanted the script to do something while it was waiting for the height to be under 2, but in most cases i prefer not to use loops, so maybe try

@(getpos heli select 2)<2
hint "Altitude Under 2!"