Deleting spawners within a radius?
- 
				MetalPigeon
 - Manual Inserter

 - Posts: 4
 - Joined: Fri Feb 02, 2018 8:18 pm
 - Contact:
 
Deleting spawners within a radius?
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?
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
- 
				MetalPigeon
 - Manual Inserter

 - Posts: 4
 - Joined: Fri Feb 02, 2018 8:18 pm
 - Contact:
 
Re: Deleting spawners within a radius?
thanks!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
Re: Deleting spawners within a radius?
You can do this in game with artillery 
			
			
									
									"No! This one goes there! That one goes There! Right?!"
						
