Deleting spawners within a radius?

Post all other topics which do not belong to any other category.
Post Reply
MetalPigeon
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Feb 02, 2018 8:18 pm
Contact:

Deleting spawners within a radius?

Post 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!

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Deleting spawners within a radius?

Post 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

MetalPigeon
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Feb 02, 2018 8:18 pm
Contact:

Re: Deleting spawners within a radius?

Post 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!

Ace_W
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue Oct 04, 2016 12:13 am
Contact:

Re: Deleting spawners within a radius?

Post by Ace_W »

You can do this in game with artillery ;)
"No! This one goes there! That one goes There! Right?!"

Post Reply

Return to “General discussion”