Home   Help Search Login Register  

Author Topic: Checking vehicle's altitude  (Read 1043 times)

0 Members and 1 Guest are viewing this topic.

srk

  • Guest
Checking vehicle's altitude
« on: 26 Jun 2006, 10:07:44 »
What is the command to check vehicle's altitude?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Checking vehicle's altitude
« Reply #1 on: 26 Jun 2006, 10:38:36 »
read the comref.
« Last Edit: 07 Jan 2009, 17:56:38 by bedges »

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re: Checking vehicle's altitude
« Reply #2 on: 26 Jun 2006, 18:50:25 »
read the comref.

...where you will find that it is the getpos command and the usage in this case would be something like
altitude = getpos mychopper select 2

 :)

« Last Edit: 07 Jan 2009, 17:56:46 by bedges »
Not all is lost.

srk

  • Guest
Re: Checking vehicle's altitude
« Reply #3 on: 26 Jun 2006, 18:54:45 »
I thought it would be much easier. ??? But anyway, thanks.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Checking vehicle's altitude
« Reply #4 on: 26 Jun 2006, 19:32:56 »
a unit's position is described using three numbers : west/east, north/south, and height. another way of writing this is [x,y,z], which is what a positional array looks like.

to get a unit's positional array you use the getpos command.

to get at the values in an array you use the select command. arrays begin at 0 for the first value, 1 for the next value, and so on.

getpos unit select 0 would give its west/east or x coordinate.
getpos unit select 1 would give its north/south or y coordinate.
getpos unit select 2 would give its height or z coordinate.

what is difficult about that?