Coug4r Posted October 11, 2015 Posted October 11, 2015 I've seen someone use some function to determine the terraintype at some point but i can't seem to find it anymore. It was something like local pos = { x = pX, y = pY } local alt = land.getHeight(pos) local terrainType = someFunction(pX,pY,alt) Does anyone know how to check for the terraintype at a certain position? Thanks. - If man were meant to fly he'd be filled with helium.
FSFIan Posted October 11, 2015 Posted October 11, 2015 You are looking for land.getSurfaceType. It takes a single parameter, a vec2 (Lua table with x and y coordinate) and returns 1 for land, 2 for shallow water, 3 for deep water, 4 for roads and 5 for airports (tarmac, runways and taxiways). DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
Coug4r Posted October 11, 2015 Author Posted October 11, 2015 Yes! Thank you! - If man were meant to fly he'd be filled with helium.
Recommended Posts