Add body to Spawn.spawning
-
In the GUI we can see the body of spawning creeps but as far as I can tell this is not available in game.
I would want to use this when attacking a room to understand the response. It could also be used as an inpute into a heuristic to guide
DISRUPT_SPAWN
. Right now I could kinda do it by inferring from creep names, needTime and anyOPERATE_SPAWN
effects, but that seems quite a long way around and fairly imprecise.
-
Try
spawn.pos.lookFor(LOOK_CREEPS)[0].body
. The creep exists in game while it's spawning in the same position as the spawner.
-
That's a good point! Thanks for the tip, didn't think of that.