• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Finding the Z of unit.

Status
Not open for further replies.
Level 7
Joined
Jun 16, 2008
Messages
253
Hey, does anyone know how to do this?

Finding the Z of stuff doesn't seem to very common on the WE, out of all the GUI pretty much only the camera has any Z finding related functions, which is un-useful.

There is a function in the function list of NewGen that seems to be able to give me the Z of a location which might be useful, but I don't really know how to use it.

Could someone give me an example of how to use GetLocationZ to find the Z of a unit or a point?
 
That's alright, I assumed that. If I wanted that, I can easily add it.
My current problem is when the unit is doing a particular thing, difference between two integers of his is 0, and the game doesn't like dividing by 0. So I'm cheating by adding 1, but I don't know if it will have a cumulative effect problem. Oh well, cross me fingers. I think dividing by 0 makes it infinite. Wish it would just make it 0.

You guys will see what I mean if you have a look at my next update.
 
and instead of local location a = GetUnitLoc(u)
you can create a global location move it to GetUnitX/Y its better than creating/destroying a function everytime
 
I'll keep that in mind, would it cut down on lag? Or does that result just from Pick every unit?
 
Status
Not open for further replies.
Back
Top