OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: [seven] on 21 Mar 2007, 21:41:30

Title: auto determine roof height
Post by: [seven] on 21 Mar 2007, 21:41:30
Greetings all!

I thought I saw a topic on this but I can't seem to find it now, maybe someone can help me out...

How can a script automatically determine the height at which a buidlings' roof is at?

More specifically, I'll be using  the nearestbuidling command to find a building, then i need to find it's height, then once the height is determined that number will be used to place an object on top of it, sniper, chopper, etc.
Title: Re: auto determine roof height
Post by: Cheetah on 22 Mar 2007, 13:43:14
You might want to use the buildingPos (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=a#buildingPos) command and check the z-values to determine the highest position. More info (in the comments part) can be found at Biki buildingPos (http://community.bistudio.com/wiki/buildingPos).

Probably doesn't help you, for a unit this is probably not a problem for small buildings. Just setPos him at 10m, z-axis, and he'll fall down on the roof. Of course this is only a temporary solution, I'm sure that there is a script able to detect the building height. I'll work on it as soon as I have time for it.