ok chaps, i'v read the tut on this but i still cant get it to work how i want...
first off heres the code i have...
_unit = player
_d = (getdir _unit - 270)
_x = (getpos _unit select 0) - (7.8 * cos _d)
_y = (getpos _unit select 1) + (7.8 * sin _d)
_main = "FenceWood" createvehicle [_x,_y,0]
_main setdir ((getdir _unit) + 90)
_main setpos [_x,_y,0]
_d = (getdir _main)
_x = (getpos _main select 0) + (2.4 * sin _d)
_y = (getpos _main select 1) - (2.4 * cos _d)
_wall = "FenceWood" createvehicle [_x,_y,0]
_wall setdir _d
_wall setpos [_x,_y,0]
exit
Now what i want it to do
Place a sandbag wall (fencewood) infront of the player (which works fine) and then place another right next to the one it just made.
Now i want this to work no mater what direction the user is facing, but if u test it you will see it dosnt make the second one right next to the first.
any ideas?
cheers,
Phil