Details of the creep being spawned currently that can be addressed by the
StructureSpawn.spawning
property.
An array with the spawn directions, see
StructureSpawn.Spawning.setDirections
.
The name of a new creep.
Time needed in total to complete the spawning.
Remaining time to go.
A link to the spawn.
Game.spawns['Spawn1'].spawning.cancel();
Cancel spawning immediately. Energy spent on spawning is not returned.
One of the following codes:
constant | value | description |
---|---|---|
OK
|
0 |
The operation has been scheduled successfully. |
ERR_NOT_OWNER
|
-1 |
You are not the owner of this spawn. |
Game.spawns['Spawn1'].spawning.setDirections([RIGHT, TOP_RIGHT]);
Set desired directions where the creep should move when spawned.
parameter | type | description |
---|---|---|
directions
|
array<number> |
An array with the direction constants:
|
One of the following codes:
constant | value | description |
---|---|---|
OK
|
0 |
The operation has been scheduled successfully. |
ERR_NOT_OWNER
|
-1 |
You are not the owner of this spawn. |
ERR_INVALID_ARGS
|
-10 |
The directions is array is invalid. |