Game find entities
Posted: Fri Feb 26, 2016 6:42 pm
In previous versions of Factorio we had lua.game methods "game.findentities" and "game.findentitiesfiltered". In current vers it doesnot work, and i didnt find this methods (or another methods, that can do the same) in Lua.Game docs. I used this e.g. this way:
How can i do this in new version?
Code: Select all
game.on_event(defines.events.on_chunk_generated, function(event)
local tree = game.find_entities_filtered{area = event.area, type= "tree"}