I used this script that destroys any fire in an area around every entity killed
Code: Select all
script.on_event(defines.events.on_entity_died, function(event)
local area_start = {event.entity.position.x - 10, event.entity.position.y - 10}
local area_end = {event.entity.position.x + 10, event.entity.position.y + 10}
for _, ent in pairs(event.entity.surface.find_entities{area_start, area_end}) do
if ent.valid then
if ent.type == "fire" then
ent.destroy()
end
end
end
end)