"location" ? Why does it show up as blue?

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
Is location a data type? I cant find any documentation on how to use it. Or how its used.
I am assuming its used to store a x,y. But can someone show me how to use it?
Other wise Ill just make my own. It just be easier to make my own because I have to add z to it.


If this is a common thing, Can someone show me a place where I can find info on things like this? for jass.
 

Azlier

Old World Ghost
Reaction score
461
[lJASS]location[/lJASS]s are the 'point' objects used in GUI. They are useless for everything except getting the z of an x, y coordinate.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
yeah, don't use them, because they are a pretty obsolete handle
 

Prozix

New Member
Reaction score
7
My jass skills are a bit rusty but i've taken the liberty to write this small snippet you could add to your project, I'm not sure if the syntax and/or functions are correct but they are easy to fix :D

JASS:
scope GetZ
globals
  private location l = Location()
endglobals

//GetZOfPoint, GetZXY, GetPointZ, PointZ whatever you'd like to call it xD
function GetPointZ takes real x, real y returns real
  call MoveLocation(l, x, y)
  return GetLocationZ(l)
endfunction

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

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
Thanks when I far enough along, Ill try to use that as an example or just copy it straight in. :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top