How to Place Unit Inside Building (the easy way)
Credits to 2nd Ranger or probably Celery for this.
http://forums.bistudio.com/showthread.php?77393-Putting-units-inside-buildings&p=1953385&viewfull=1#post1953385
I highly recommend you have your game in windows mode for this so it's easier for you to alt tab in between to get to your notepad easier to paste down the position.
Go into the editor and place a temporally civilian unit or any unit and make it either player or playable. You'll delete this character later on anyways, but place it near the building you want.
http://forums.bistudio.com/showthread.php?77393-Putting-units-inside-buildings&p=1953385&viewfull=1#post1953385
I highly recommend you have your game in windows mode for this so it's easier for you to alt tab in between to get to your notepad easier to paste down the position.
Go into the editor and place a temporally civilian unit or any unit and make it either player or playable. You'll delete this character later on anyways, but place it near the building you want.
Now create a trigger.
ACTIVATION: Radio Alpha
Make it repeat
CONDITION: This
ON ACT: copyToClipboard format ["this setPosATL %1;this setDir %2;",getPosATL player, getDir player];
ACTIVATION: Radio Alpha
Make it repeat
CONDITION: This
ON ACT: copyToClipboard format ["this setPosATL %1;this setDir %2;",getPosATL player, getDir player];
Now preview the game. Find a building or position around that you want to be in. Face the direction you want the enemy to face and then click 0-0-1 to go to your radio then radio alpha. It'll copy the position you're at. Now alt tab and paste into your notepad, and find another location and repeat the same process. Just do it for a few then do some more later so you don't forget all the positions you marked.
- After this exit out and place some units that you want to put inside of the building.
- Cut or copy the positions you pasted in your notepad into the unit's init that you want to place inside of the building.
- Set the Azimuth or Angle to the same # as the this setDir #;
- Close out your notepad when you're done.
- Cut or copy the positions you pasted in your notepad into the unit's init that you want to place inside of the building.
- Set the Azimuth or Angle to the same # as the this setDir #;
- Close out your notepad when you're done.
There's your guy in the building.
You can also make him crouch or be in prone position instead of stand up by adding this setUnitPos "X";
X = UP, MIDDLE, or DOWN
Up = Stand up
Middle = Crouch
Down = Prone
so let's go with this setUnitPos "Middle";
X = UP, MIDDLE, or DOWN
Up = Stand up
Middle = Crouch
Down = Prone
so let's go with this setUnitPos "Middle";
There's your guy in the building crouching instead of standing.
DON'T FORGET TO DELETE THE RADIO TRIGGER ONCE YOU'RE DONE AND SAME GOES FOR YOUR TEMPORALLY CIVILIAN UNIT.