Forum Jump :

Author Message


Posts: 3
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2013-12-11 21:43        
     
Ok so i was having problems keeping my buildings horizontal after i put them there in the editor. espeshily on small hills as the buildings snap to the landscape and wondered if there was a fix for this to keep them flat.

so after a few days of looking for a solutuion i found this forum post on bohimia interactive *YAHOO*
http://forums.bistudio.com/showthread.php?155495-Arma-2-OA-3D-Editor-building-placement

here's a small guide to it if you don't want to read the post.

step 1. make sure you have your building set in the right position in your editor press and edit and ok to set it horizontal. (keep in mind when you save it, this will still make it wonky for now)

step 2. find the building or object you want to keep flat in your sqf file.
it should look a bit like this


_vehicle_145 = objNull;
if (true) then
{
_this = createVehicle ["Land_A_Castle_Bergfrit", [13765.547, 2918.8208, -10.333763], [], 0, "CAN_COLLIDE"];
_vehicle_145 = _this;
_this setDir 304.91043;
_this setPos [13765.547, 2918.8208, -10.333763];
};

step 3. add this like at the bottom of the setPos line "this setVectorUp [0,0,1];"

_this setPos [13765.547, 2918.8208, -10.333763];
_this setVectorUp [0,0,1];
};

When you have done this it should set the position of your building or object horizontal just like you left it in the editor after you click edit and ok.

I hope this is helpful to people who are getting most pissed of with map editing :D
and credit to the guy who helped me in the first place. (cheers bud)

This post was edited by oxygen220 (2013-12-12 07:41, ago)


Author Message


Posts: 7
Rank:


Level: Member

Country: de
Location: Oberhausen
Occupation:
Age: 45
In-game name: Winters

 
#2 Posted at 2013-12-12 07:46        
     
You can use the initfield of the Building in the editor to do this.

Just place "this setVectorUp [0,0,1];" there.


Advertisement


Author Message


Posts: 3
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2013-12-12 17:09        
     
how do you do this in the editor?


Author Message


Posts: 7
Rank:


Level: Member

Country: de
Location: Oberhausen
Occupation:
Age: 45
In-game name: Winters

 
#4 Posted at 2013-12-12 20:26        
     
In the window that opend, when you place a object in the editor, is the field initialization. There you place the command.
Important, use "this" and not "_this".

Commands in this field are executed at missionstart. When you place "this setpos [(getPos this select 0), (getPos this select 1), 10];" in the initfield of a unit, the unit spawn 10 m ocver the ground. When you not have a init.sqf in your mission you can start a scipt on this way and so on.

I made a short test with some buildings (with ArmA III) and it works. Hape the same for ArmA II because it's easier than your way.


Author Message


Posts: 3
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2013-12-13 15:19        
     
ah im using a different editor for arma/dayz jon edit update. that window doesn't come up so i gotta do it in the sqf file after