D.V.D
Make a wish
- Reaction score
- 73
I don't know if this was posted before but here's a little snippet that gets the TerrainZ in location of your choice.
Code:
Code:
JASS:
library GetTerrainZ
// How to Implement:
//
// Copy this code
// Create a trigger in your map
// Change the trigger to custom script
// Paste the code into the trigger
globals
location GL = Location(0,0)
endglobals
function GetTerrainZ takes real x, real y returns real
call MoveLocation(GL, x, y)
return GetLocationZ(GL)
endfunction
function GetTerrainZLoc takes location loc returns real
call MoveLocation(GL, GetLocationX(loc), GetLocationY(loc))
return GetLocationZ(GL)
endfunction
endlibrary