Jump to content
Sign in to follow this  
SOSyourself

Placing units inside of buildings / On towers

Recommended Posts

Hi all,

When I use the editor, it is really hard to position soldiers inside of buildings and on guard towers. Is there an easy way to do this? The only thing I can think of is using the 3D editor.

Thanks

Share this post


Link to post
Share on other sites

This is prolly not the answer you are looking for (sorry about that) but practise makes perfect. It really is a downer to put alot of units inside towers etc. but once you get the hang of it, you can pretty much copy/paste the units to other towers (same height, same relative position etc.).

For regular buildings you can use this command:

_unit setPos (_house buildingPos _posNo);

Where _unit is the name of the unit, _house is the name of the house, and _posNo is the house position number.

To get the building name you can use this:

nearestBuilding _unit;

To get positions you can use some commands or Grizzle's "Visual House Position Module" here: ..

So use the module to check the locations in the types of houses you need, and then put this in the init line of the unit you want in there and place him on the house in the editor:

this setPos ((nearestBuilding this) buildingPos _X);

then just replace the _X with the wanted position inside the house.

Hope it helps

Share this post


Link to post
Share on other sites

Try using the 3d editor, you can then call them into your mission, it's quite easy, I don't have time to give you details now but if you interested I'll tell you later, it's the best and easiest way to position units

Share this post


Link to post
Share on other sites

this setPosATL [getPos this select 0,getPos this select 1,100];this setPosATL [getPos this select 0,getPos this select 1,(getPosATL this select 2)-(getPos this select 2)]

Change the bold number to the approximate level of the floor for inside jobs. If you want to place a unit on top of something, 100 is fine. It works by changing an object's height to something and then moving the object onto the nearest surface below it.

Share this post


Link to post
Share on other sites

Variation that I use: easy method to assign positions in buildings:

Put this in the soldiers init:

this setPos ((position this nearestObject 123839) buildingPos 4);

123839 = building identifier number - max zoom in on the Editor, press the ID's button.

4 = building position - you will have to figure out where these are.

If you go into a building as a squad leader and press space - you get lines to building positions as you move the cursor around.

If you want to make them keep standing up - best on balconies etc:

this setUnitPos "Up";

Share this post


Link to post
Share on other sites

The one I use is basically a variation on the old "setpos getpos" routine that'd take up half a screen:

this setpos (this modeltoworld [0, 0, x]);

exchange x for a positive number, e.g. 5 or 10, and the unit will be placed that many meters up in the air. Then you just have to experiment a little :)

Regards,

Wolfrug

Share this post


Link to post
Share on other sites
Variation that I use: easy method to assign positions in buildings:

Put this in the soldiers init:

this setPos ((position this nearestObject 123839) buildingPos 4);

123839 = building identifier number - max zoom in on the Editor, press the ID's button.

4 = building position - you will have to figure out where these are.

If you go into a building as a squad leader and press space - you get lines to building positions as you move the cursor around.

If you want to make them keep standing up - best on balconies etc:

this setUnitPos "Up";

Looking at trying to find a way to place a friendly AI sniper for overwatch protection within different buildings. Think I will try to use the above method.

Question what is the ID Button (when zooming map in editor).

Share this post


Link to post
Share on other sites

Use your mouse wheel to zoom right in on an object and when you zoom on enough you will see the ID number of that object

Share this post


Link to post
Share on other sites

If you don't know where the ID button is, it is on the right hand side of the editor screen somewhere. Additionally, I think PELHAM's method is the best one so far. It may not be exactly what you want though.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×