OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: ZapBrannigan on 20 May 2007, 04:23:30

Title: scripting start
Post by: ZapBrannigan on 20 May 2007, 04:23:30
How would I make a script to get the position of a helocopter, and tell if it is on the ground?

thank you
Title: Re: scripting start
Post by: Mandoble on 20 May 2007, 12:39:16
Code: [Select]
;Checkheight.sqs
_unit = _this select 0
_pos = getPos _unit
?(_pos selec 2) < 1: hint "unit on the ground"
?(_pos selec 2) >= 1: hint "unit flying"
exit

To execute it:
Code: [Select]
[unitname]exec"checkheight.sqs"
Title: Re: scripting start
Post by: ZapBrannigan on 21 May 2007, 01:37:23
ahhh, it worked, thank you