Jump to content
Sign in to follow this  
Pundaria

In editor, how to place someone into a house rather than standing on the roof?

Recommended Posts

In editor, how to place someone into a house rather than standing on the roof?:confused:

Share this post


Link to post
Share on other sites

In the unit's init:

this setPos ((getPos this nearestObject [i]ID[/i]) buildingPos [i]index[/i])

ID is the building ID which you can find by turning on "Show IDs" in the editor. Index corresponds to which building pos to place him at (enterable buildings usually have several depending on their size).

You can find building pos's by making yourself a squad leader, selecting a unit in game, and putting your cursor over a specific area of the building. The index will be 1 less than the number that shows up in your cursor (since they are 0 based, but in game they show starting at 1).

Edited by Big Dawg KS

Share this post


Link to post
Share on other sites

Or you can give him a move waypoint in the house and pick the position from the drop down list. You have to test to see where each position is in the house but it works. Usually position #1 is near the entrance and higher numbers are further/higher in the building!

Share this post


Link to post
Share on other sites

Or you can put this is init field:

this setPos [getPos this select 0,getPos this select 1,0];

You can set it to 0 (zero) this way it will ensure unit is at ground floor and not on roof.

Cheers.

Share this post


Link to post
Share on other sites
In the unit's unit:

this setPos ((getPos this nearestObject [i]ID[/i]) buildingPos [i]index[/i])

ID is the building ID which you can find by turning on "Show IDs" in the editor. Index corresponds to which building pos to place him at (enterable buildings usually have several depending on their size).

You can find building pos's by making yourself a squad leader, selecting a unit in game, and putting your cursor over a specific area of the building. The index will be 1 less than the number that shows up in your cursor (since they are 0 based, but in game they show starting at 1).

type in initialization or condition???

Share this post


Link to post
Share on other sites

Also had issues here. Same line of code, different places or characters. Some just will not stop landing on the roof.

this setPos [getPos this select 0,getPos this select 1,0];

Assuming 1 is position in building?

Or you can give him a move waypoint in the house and pick the position from the drop down list. You have to test to see where each position is in the house but it works. Usually position #1 is near the entrance and higher numbers are further/higher in the building!

This has been the best way for me, if I have had issues. Just put them outside and send them in.

Not good for hostages and so 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  

×