Page 1 of 1

Deleting spawners within a radius?

Posted: Fri Feb 02, 2018 8:23 pm
by MetalPigeon
So i'm in my first map and i realize i would have liked to turn off the automatic spread of alien bases. I was hoping someone knows a command to delete everything hostile (spawners, biters, spitters, worms, etc) within a specified radius. i've done some googling but all the commands i found where out of date and didn't work. would greatly appreciate any help!

Re: Deleting spawners within a radius?

Posted: Fri Feb 02, 2018 8:47 pm
by DaveMcW

Code: Select all

/c radius = 500
p = game.player.position
enemies = game.player.surface.find_entities_filtered{area={{p.x-radius,p.y-radius},{p.x+radius,p.y+radius}}, force=game.forces.enemy}
for _,enemy in pairs(enemies) do enemy.destroy() end

Re: Deleting spawners within a radius?

Posted: Fri Feb 02, 2018 9:17 pm
by MetalPigeon
DaveMcW wrote:

Code: Select all

/c radius = 500
p = game.player.position
enemies = game.player.surface.find_entities_filtered{area={{p.x-radius,p.y-radius},{p.x+radius,p.y+radius}}, force=game.forces.enemy}
for _,enemy in pairs(enemies) do enemy.destroy() end
thanks!

Re: Deleting spawners within a radius?

Posted: Fri Feb 02, 2018 10:14 pm
by Ace_W
You can do this in game with artillery ;)