Benneb 10 Posted July 30, 2009 Hi all, Using a combination of the excellent PlaceGroupInBuilding and HousePatrol scripts, i have managed to make a garrisoned units script. Unfortunatly it seems some buildings have a couple of crazy positions set in them. Most of the stupid position bugs i have managed to overcome. The problem i am having is in some of the buildings there are positions far higher than the actual height of the building, resulting in some comedy placements with enemy units stood in the sky. Does anyone know how to get the height of an object (In this case a house/building)? Not the placement height of the building but the actual size of it. If i can get that i can ignore any position with a height, say 1 meter higher than the buildings height. Apologies if this has been asked before. I did search for it but i couldnt find it. Share this post Link to post Share on other sites
Tajin 337 Posted July 30, 2009 _bbox = boundingBox _obj; _height = _obj modelToWorld (_bbox select 1); _height = _height select 2; this should do the job. Its not 100% accurate, but enough to verify your positions. Share this post Link to post Share on other sites
rübe 118 Posted July 30, 2009 You might wanna try it with this: boundingBox Share this post Link to post Share on other sites
Benneb 10 Posted July 30, 2009 Brilliant, that looks exactly like what i was after. Thanks guys. Ill give it a go when i get home :) Share this post Link to post Share on other sites