Aequitas
Aequitas

Reputation: 2265

Is there any way to change the spawn location?

Currently a new creep will spawn one square above the spawn or in the next available clockwise position.

Is there any way to choose where newly created creeps go?

Upvotes: 1

Views: 1532

Answers (2)

Matthew Storkey
Matthew Storkey

Reputation: 61

In the newer api this can be done with spawnCreep by adding the optional parameter directions. This parameter accepts an array of preferred directions.

Game.spawns['Spawn1'].spawnCreep([WORK, CARRY, MOVE], 'Creep1', {
    directions: [TOP_RIGHT]
});

Upvotes: 6

Maltir
Maltir

Reputation: 64

You can't but you can make it moving after it was created with a flag.

if(Game.flags.Flag1 !== undefined){
    creep.moveTo(Game.flags.Flag1);
}

Upvotes: 1

Related Questions