HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How can i find the Z of a unit

08-05-2009, 09:21 AM#1
Mendel
For a camera, i want to find the Z of a unit so the camera will go up and down same as he's height..
08-05-2009, 09:38 AM#2
Hans_Maulwurf
Edit: Antiarf is right. Unless you change the flying height with triggers just use GetUnitFlyHeight()
Sorry about that :x
08-05-2009, 09:45 AM#3
Mendel
huh? O_O
08-05-2009, 11:38 AM#4
Fledermaus
Does GetUnitFlyHeight not work?
08-05-2009, 11:53 AM#5
Anitarf
Quote:
Originally Posted by Fledermaus
Does GetUnitFlyHeight not work?
It works. Only problem is, if you don't change the flying height of a unit instantly, but over time (using SetUnitFylHeight), GetUnitFlyHeight will return the final fly height of the unit even if the change hasn't finished yet.
08-05-2009, 01:58 PM#6
Mendel
doesn't it work for flying units only?
08-05-2009, 02:23 PM#7
Anitarf
It works for any unit. SetUnitFlyHeight works only for flying units, that is, unless you use the crow form trick.
08-05-2009, 02:31 PM#8
Mendel
cool, well, it could help...if i knew anything about jass xD i am still at GUI
08-05-2009, 02:39 PM#9
Rising_Dusk
GetUnitFlyHeight also returns incorrectly for transfer-height values over cliff-level changes and the flying height of units over destructables like forests. It only works correctly if you use a ground unit with the flying-unit-trick and then use SetUnitFlyHeight.
08-05-2009, 08:39 PM#10
Anitarf
Ground units won't work correctly over water, you need to use floating units (or naval, you can always move them to unpathable terrain with SetUnitX/Y).