The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

tile is underground?

Started by Yona-TYT, June 17, 2020, 03:20:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


When using "sliced map view", it would be nice to have a function to differentiate between surface tiles and underground tiles.

something like "tile_x (). is_underground()"

Is this possible?


if ( tile_x.z < square_x(tile_x.x, tile_x.y).get_ground_tile().z ) {
  // tile is underground


Certainly this works, although analyzing more the problems, I realize that it is not what I am looking for (my error).

In reality, what I am looking for is some way to differentiate between an underground slope "when a section of a tunnel rises" from an underground position without a slope or tunnel.
  But unfortunately tile_x().get_slope() only returns the slope of the surface when there is no tunnel.