Max Spawning Distance?
-
Was going through the tutorials and noticed we can spawn creeps at a distance from the spawner and was wondering how far away can a creep being spawned be max.
-
Spawning outside the spawn? Did I get this right? It would sound like a bug.
-
The creep should originate from the spawn, then when the creep is ready will move out one of the constant directions from the spawn (a distance of one).
You can use direction as one of the ops when spawning the creep to pick which direction it will come from, if not set should be TOP if there are no creeps already occupying that space.
-
@duckymirror ya one of the tutorials has us move the creep that was spawning out a tile for some reason. I'll see if I can find the code in a bit.
-
Found it, the strangeness is under tutorial 4.
if(Game.spawns['Spawn1'].spawning) { var spawningCreep = Game.creeps[Game.spawns['Spawn1'].spawning.name]; Game.spawns['Spawn1'].room.visual.text( '🛠️' + spawningCreep.memory.role, Game.spawns['Spawn1'].pos.x + 1, Game.spawns['Spawn1'].pos.y, {align: 'left', opacity: 0.8}); }
-
@stormwing0 that code isn't doing anything to the spawning creep. Its simply writing some text with RoomVisuals to show what is being spawned. Its offset so it doesn't draw on top of the spawn which would be hard to read. Room visuals can be placed wherever you like in a room, but they are only visual, have no interactions and only you can see them.
-
@qgazq oh so that's what's going on my eyes must have glossed over that part in the tutorial.