Jump to content
Sign in to follow this  
Mandingo

Getting units into buildings

Recommended Posts

How do i place a unit in a building, they always end up on the roof if just placed.

Thanks again

Share this post


Link to post
Share on other sites

u mean inside game or editor?

when u near the house u can show AI the position direction, u will get a description of the number (#) when your AI is selected atm.

Share this post


Link to post
Share on other sites

Let me make it very clear since it has been described various ways in many posts but not always clearly.

What I have found to work best is to go into the editor and make a group of 2 men with different ranks. Position them next to the building. Make yourself the leader (highest rank). Preview the mission. hit F2 to select the group member and look around at the house. You will see pre programmed positions with lines pointing to them. Pick which number you want to use for your soldier. Exit the editor. Place your soldier next to the building and select "waypoints". select your man and mouse over the middle of the house and the word "house" should appear. DoubleClick to place the waypoint and you will get a new drop down menu with the pre programmed house positions. Pick the one you want. Start the mission and make sure it works. As mentioned above you can use the SetPos command alone or in combination with this method, but it can be time consuming to get each man where you want, but sometimes it's the only way you can get it to work. To do this you put this in the Init line of the unit:

this setpos [(getpos this select 0), (getpos this select 1), 10.2];

You will need to change the last number "10.2" to whatever altitude you need for your man. Hope this helps. Have fun making your own missions.

Share this post


Link to post
Share on other sites

In the upper right section of the forums is a very interesting text.

"Search this forum"

bissearchb4nt.jpg

Then some threads show up covering topics which already has been mentioned.

For example:

http://forums.bistudio.com/showthread.php?t=94373&highlight=buildings

and

http://forums.bistudio.com/showthread.php?t=94315&highlight=buildings

If that fails you could try searching the ARMA - MISSION EDITING & SCRIPTING-forum.

Good luck.

Share this post


Link to post
Share on other sites

Hi one week into editing.

Just OA installed. Read MrMurrys excellent doc. Trial, error and searched forum for three hours. I go in loop of same links.

I already have a few captives/ammo crates inside (setpos) so know the workings.

Want to order/trigger AI team member into a house position from outside.

moveto, domove.movecommand and AI just run and stands outside. Read its a AI weakness.

So tried suggested waypoint. Got a test AI unit, set MOVE waypoint, set position in WP menu ( can also setpos unit inside and it has 6 positions, so assume is enterable! Read those threads). Again unit runs then stands in same outside spots.:cryy:

They will not even go to outside pos.

Do I have a bugged enterable house?

(my mission: I run in, rescue captives (works), demo man runs in sets charge, runs out, boom)

ta

Share this post


Link to post
Share on other sites

Both a waypoint method and the buildingPos method worked for me in a quick text.

a1 doMove ((position a1 nearestObject 3872) buildingPos 2)

(3872 is the Villa in Zargabad)

Share this post


Link to post
Share on other sites

hello Kylania,

takistan map...2oclock from Anar, building in middle of forest map 06,07

a1 doMove ((position a1 nearestObject 18561) buildingPos 4) does not work. unless I misunderstood i.e. have to use waypoint and domove together?

I used above domove instruction only in a trigger action.

Ai still moves to same place as other commands....

pos confirmed as I have crates there using setpos.

Edited by cream-t

Share this post


Link to post
Share on other sites

Looks like a problem with that specific location, the stairs are blocked so the AI can't get into the building. doMove and Waypoint (used separately) end up sending the guy to the south of the building. setPos however moves him right there inside the building.

As you can see here, the top is the building in question with no stairs, the bottom picture is the same style building but in the clear, and with stairs visible. The doMove works with that stand alone house.

housesi.jpg

Share this post


Link to post
Share on other sites

thx Kylania,

looks like I am moving house.

Hope this helps others as not seen a answer like this.

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  

×