
Hi I'm new to lua and factorio modding in general. I have a question for you. I want to make a mod that adds special trees to the game. these trees, will grow and then drop to the ground an item every minute/some time. can someone help me? thanks!

Code: Select all
script.on_event(defines.events.on_tick, function()
if game.tick % 3600 then
-- make your trees drop items
end
end)
Code: Select all
game.players[playerId].surface.create_entity(...) -- playerId is index of a player