here is the code
Code: Select all
local oretest = {}
script.on_event(defines.events.on_entity_died, function(event)
if event.entity.name == "small-biter" then
local smallbiter = event.entity
local targetpos = smallbiter.surface.find_non_colliding_position("copper-ore", smallbiter.position, 10, 1)
end
local tore = player.surface.create_entity({
name = "copper-ore",
position = targetPos
})
end)