Is there a way to delete creeps?

1.2k Views Asked by At

Is it possible to delete created creeps? Either through a script or through the GUI?

I could not easily find a way to do this, but it seems like a simple functionality so I imagine it exists, or someone has thought about it or something.

2

There are 2 best solutions below

0
On BEST ANSWER

You can use Creep.suicide method.

for(var i in Game.creeps) {
    Game.creeps[i].suicide(); // lemmings style!
}
1
On

set the creep = null

Game.creeps.Harvester1 = null

this deletes it and removes all its energy.