Map Addition Question - Buildings on Slopes

delpi

Well-Known Member
I've noticed that when I go through the process of adding buildings in the arma 2 editor, they snap to the group correctly.

When I move it over to my mission file and run it, things don't always line up with the ground right. Half the building is above the ground the other is under. Very much unlike what it looked like in the editor.

Anybody know a way around that?
 
that happens. It seems that sometimes the first time you save the file, it saves the positions incorrectly. what usually works for me is to put the buildings in the editor. then save the file. then go back into the editor and just click the building to reset its position (if its crooked) , and save it a second time.
Seems to be mostly the buildings with larger square area as they try to conform to the unlevel ground below them.
I am sure you could use an init string to setpos the building correctly on slopes if they just refuse to cooperate
this setvectorup [0,0,1]
or if its still not quite right
this setpos [getpos this select 0, getpos this select 1, -1]
 
Could you expound on that last one?

I think you are telling it to get the X and Z from current, but move it 1 measurement under the ground?

that won't fix orientation to ground it will just lower it right?
 
Yeah, I would say X and Y and the Z is altitude which it sets at -1 to make sure its just a tad bit below the ground but in testing just now the Z axis seemed to have no effect on buildings. And if you are putting these in the editor there is a line for the init string, just put the code right there and this code is executed after the building is created.


Here is the default placement of this building
0CFYSZL.png


Now here is with the setvectorup in the init expression.
The setpos code resulted in identical placement.
W4ATjb7.png
 
Back
Top