OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gundernak on 01 Nov 2003, 18:18:22
-
Hi all,
I would like to setPos a sodier to a watchtower.
Please help me in the syntax and what command to use in the soldier's init field or in a script made for achieve this.
Thanks in advance
-
place him directly over the tower and put the following in the init line:
this setpos [(getpos this select 0), (getpos this select 1), (getpos this select 2) + 3]
the + 3 puts him 3m in the air. experiment with this value until you get him where you want. you may also want to put:
this setunitpos "up"
This prevents him from going prone while in the tower
-
I haven't tried that mikeb,
What I use is:
This SetPos [Getpos This Select 0, GetPos This Select 1, x]x being the variable height.
Or you could select 'Flying' in the 'Special' menu of the unit
And as mikeb said:
This SetUnitPos "Up"
Beware the GrimMonkey
-
Thanks mikeb!!!
It was pefect....and working
GrimMonkey,
I think the '...select ) + 3' is always exactly the height of the coordinates
anyway thank you Gentlemen
-
what grimmonkey said will work just as well with a little less text. my line put the unit up 3m relative to where he starts . seeing as the ground units always start at 0m (ground level) anyway, you can leave the last "select" bit out and put in a staright number value.
-
solve topic then?
-
lol thx guys you helped me out too :)
-
thanks all,
I left this topic open to be able to reply or add something else...
definetely we can close
;)