• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
imagem
lelyanra

imagem

How did you figure the head location is 100?
If the above is true, when you find the feet elevation on the right picture, you can add 100 to it to find the head elevation.
Maybe you can use a flying unit and set it's fly height to 0, and when it gets to the top of the terrain like in the right picture, you can use some sort of trigger to detect the current fly height.
 
Create some random location like:

location LOCATION_Z = Location(0.0, 0.0)

Then use this custom function (c'n'p it into your map custom script or some library you use for these custom functions):

function GetUnitZ takes unit u returns real
call MoveLocation(LOCATION_Z, GetUnitX(u), GetUnitY(u))
return GetLocationZ(LOCATION_Z)
endfunction

This will return the height of the terrain (or the target unit's feet if you prefer).
To calculate the height of it's head, just add 100.0 as you did.
 
This is what I use to make chain spells, when calculating a unit's chest height.
Haven't tested it on anything else, but it should work well.
 

Media information

Album
Problems
Added by
lelyanra
Date added
View count
503
Comment count
5
Rating
0.00 star(s) 0 ratings

Share this media

Top