Home   Help Search Login Register  

Author Topic: auto determine roof height  (Read 1917 times)

0 Members and 1 Guest are viewing this topic.

Offline [seven]

  • Members
  • *
auto determine roof height
« 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.

Offline Cheetah

  • Former Staff
  • ****
Re: auto determine roof height
« Reply #1 on: 22 Mar 2007, 13:43:14 »
You might want to use the buildingPos command and check the z-values to determine the highest position. More info (in the comments part) can be found at Biki 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.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!