So far i only have an event to detect when the player has placed a tile but i am a bit stuck because it doesn't seem that the tiles property of the event's input is structured the way the factorio api says because it keeps making error when i do things that should work.
Here's the script i have so far
Code: Select all
function tilePlaced(event)
for _, tile in ipairs(event.tiles) do -- makes error
end
end
script.on_event(defines.events.on_player_built_tile, tilePlaced)