Home   Help Search Login Register  

Author Topic: scripting start  (Read 1178 times)

0 Members and 3 Guests are viewing this topic.

Offline ZapBrannigan

  • Members
  • *
scripting start
« 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

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: scripting start
« Reply #1 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"

Offline ZapBrannigan

  • Members
  • *
Re: scripting start
« Reply #2 on: 21 May 2007, 01:37:23 »
ahhh, it worked, thank you