The tile_x function does not recognize the z coordinate at all, is this an error?
I try to use "tile_x (pos.x, pos.y, pos.z +1) .is_marked ()" to prevent the use of elevated tracks, but I need the height coordinates to be working well.
Example:
function is_work_allowed_here(pl, tool_id, pos) {
if (tool_id==4110){
if(tile_x(pos.x, pos.y, pos.z +1).is_marked())
return 0 // High tracks are not allowed else
return null
}
}
(https://www.mediafire.com/convkey/9034/319bvq1b50ye0636g.jpg)
You cannot mark non-existing tiles. If tile at given coordinate does not exist, tile_x uses the ground tile.
I wonder if it is possible to get the coordinates of the cursor when it builds an elevated track ??.
Maybe you can distinguish between a elevated track and a normal track.
Look at the image:
(https://www.mediafire.com/convkey/a62d/xh60sqc1ubwglay6g.jpg)