public tuple tile(int id)
represents a single terrain tile can also be used as vec2 <-> int conversion
public function setWaterBaseColor(colorA color)
public function tile(int x, int y) returns tile
public function tile(real x, real y) returns tile
public function vec2.setTerrainType(int ttype, int variation, int area, int shape)
public function vec2.getTerrainType() returns int
public function vec2.getTerrainVariance() returns int
public function vec2.addTerrainHeight(real val) returns terraindeformation
Applies a single terrain deformation to closest tile. Is not immediate. Reports shows that this may cause desync with Mac players.
public function vec2.setTerrainPathable(pathingtype ttype, bool flag)
Fills 32x32 rect around vec2 with given pathing type
public function vec2.isTerrainPathable(pathingtype ttype) returns bool
Returns if a specific pathingtype is set at the location. Note: Returns true if the pathingtype is not set, false if it is set.
public function vec2.toTileCenter() returns vec2
Returns center of the Tile which given vec2 belongs to.
public function vec2.getTerrainNormal(real sampleRadius) returns vec3
Returns the (not normalised) terrain-normal at the given point
public function vec2.isTerrainDeepWater() returns boolean
public function vec2.isTerrainShallowWater() returns boolean
public function vec2.isTerrainLand() returns boolean
public function vec2.isTerrainPlatform() returns boolean
public function vec2.isTerrainWalkable() returns boolean
public function tile.getX() returns real
public function tile.getY() returns real
public function vec2.getTile() returns tile
Returns the tile which given vec2 belongs to.
public function tile.toVec2() returns vec2
public function tile.setType(int ttype, int variation)
public function tile.setType(int ttype)
public function tile.getHeight() returns real
public function tile.addHeight(real val) returns terraindeformation
public function tile.getType() returns int
public function tile.getVariance() returns int
public function tile.setPathing(pathingtype ttype, bool flag)
Fills the entire tile (128x128 rect around tile pos) with given type
public constant TILES_X = (boundMax.x - boundMin.x).toInt() div 128 + 1
public constant TILES_Y = (boundMax.y - boundMin.y).toInt() div 128 + 1
public constant TILES_COUNT = TILES_X * TILES_Y