globals
Location L
endglobals
function GetCoordinatesZ takes real x, real y returns real
local real z
set L = Location(x,y)
set z = GetLocationZ(L)
call RemoveLocation(L)
set L = null
return z
endfunction
globals
location L
// constant location L=Location(0,0) // I forgot if this works?
endglobals
function GetCoordinatesZ takes real x, real y returns real
call MoveLocation(L,x,y)
return GetLocationZ(L)
endfunction
// Not needed if allocating locations on map init is possible
function MapInit takes nothing returns nothing
set L=Location(0,0)
endfunction
I never said it didn't work, I said it could potentially ruin your game by lagging it because of the overhead when you allocate and deallocate the location...Or that, yes, but mine works too :3 xD
And i think you need to create the location, constant or not, you're moving a null location, so it's location L = location(0,0)
It's not a null location, 0,0 is a valid coordinate.constant may work, but i'm not sure
I'm not moving a null location, where was the null location?Troll_Brain said:Tests > Opinion