shudnt b a prob realy
find group leader
(leader groupname)
setposing unit in relative position2 oder unit
unitname setpos [(getpos (leader groupname) select 0) + sin (getdir (leader groupname) + bearing) * distance, (getpos (leader groupname) select 1) + cos (getdir (leader groupname) + bearing) * distance, 0]
(getpos unit select 0)
Gets the X co-ord of the unit you want to place your object around
sin (getdir unit + bearing) * distance
Here's the business end of it... Using a bit of trig, it gets the sin of the direction the unit is facing, adds any bearing you want, and moves the object out to the distance you specify. So:
unit - The unit you are placing the object relative to
bearing - The offset in relative bearing from the unit where you want the object placed.
Eg. 0 = directly in front of the unit
180 = directly behind the unit
90 = to the unit's right.
Try to imagine a circle of degrees around the unit, with 0 at the top and 180 at the bottom...
distance - the distance from the unit you want the object to be placed.
serding dir
unitname setdir number
da whole code ?
unitname setpos [(getpos (leader groupname) select 0) + sin (getdir (leader groupname)+ 0) * 1, (getpos (leader groupname) select 1) + cos (getdir (leader groupname) + 0) * 1, 0]
unitname setdir ((getdir (leader groupname))-180)
shud work ;D
LCD OUT