Hello,
I'm currently trying to place a bunch of resistance soldiers in that large building in the center of Lipany (Nogova map). I've tried two different methods to get the soldiers where I want them to be.
A) Create a temporary unti controlled by me and walk to the positions, then use a scripted radio command and the hint function to get my current coordinates and azimuth. Note the numbers down and then setpos() a soldier to that position in the initialization field in the editor.
B) Just get the coords of the position using the nearestbuilding() and buildingPos() functions and setpos my soldier to the position.
Now here's the problem(s) I've run into. With some of the building positions, especially the one that's basically on the roof of the building (great sniping position
), neither method works and I think it's something to do with getpos() returning the z coord (height) relative to the floor I'm standing on rather than absolute, because if I go on the roof and use the radio trick to get my current coords, it'll always return something very close to zero (sometimes even slightly less than zero) even tho the roof is cearly higher up than that. Thus when I use the coords returned by getpos(), and then setpos() a unit there, it often ends up somewhere completely wrong! I tried guessing the correct height, but this didn't work very well either. Anyone know a solution to this problem?