position object returns a 2D/3D array of the coordinates.
_pos = (getpos player)
would make: _pos =[xxx.xxxxxx,xxx.xxxxxx,xxx.xxxxxx]
x/y/z-axis coordinates
Now when refering to the whole array you can say:
object setpos (getpos player)
or:
object setpos _pos
But if you want to the value of any of the coordinates you
have to do it piece by piece for the specific element of the
array.
Let's say you want to place it 10 meters more to the left,
then you need to increase element 0 of array _pos with
the value of 10:
_newpos = [_pos select 0 + 10,_pos select 1,_pos select 2]
Now as the third element (_pos select 2) specifies the height
value, this is not really required to be used, as long as you
only want to do: 2D setpos (move object from one place to
another).
Therefore you can also say:
_newpos = [_pos select 0 + 10,_pos select 1]
P.S: don't take left/right/up/down too serious for my explanation, as i'm not sure right now if it's element 0 or
element 1, which represents the left/right axis.
Just play around a lil bit with that and you'll see.
~S~ CD