Filtering position data from tile array
Posted: Thu Nov 30, 2023 8:52 pm
How to filter the x position out of the array?
Edit:
Modders on discord helped out with this but I figured I would add it here.
event.tiles[1].position.x
1 is the nth tile
Code: Select all
local on_player_built_tile = function(event)
if (event.tile.name == "landfill") then
local a = event.tiles
local b = event.tiles.position
game.print("A")
game.print(serpent.block({a}))
game.print("B")
game.print(serpent.block({b}))
end
end
Edit:
Modders on discord helped out with this but I figured I would add it here.
event.tiles[1].position.x
1 is the nth tile