@o4kapuk said in Pull across Room frontiers:
You're able to pull one creep over an edge, but not a whole train. This is as-designed, there is no bug here. Honestly making trains inside one room is a side effect of implementation which we decided to not fix.
Ok, I understand the train part as unintended/not going to fix, but what about the dance? I tried simple going to de edge and pulling the creep and that didn't work.
Is the intended way the 6 step method described by taiga?
Tick 1: Move onto edge with pulling creep pulling other creep next to edge
Tick 2: Do nothing
Tick 3: Pulling creep is back in the room with the other creep. Now you have to issue a valid move intent to enable the pull. This is nasty. You cannot move "into the wall", you have to either move along the room edge or move back into the room you just came from. Going to assume you move along the room edge as I think moving into the room you just came from adds a tick.
Tick 4: Pulled creep is now through to the other room. If the pulling creep moved along the room edge it is also. Pulling creep moves into the room further.
Tick 5: Do nothing
Tick 6: Pull other creep off room edge.
That seems at least a little bit off, don't you think?
minimal code:
module.exports.loop = function (){
let spawn = Game.spawns['Spawn1'];
spawn.spawnCreep([MOVE], 'head');
spawn.spawnCreep([CARRY], 'tail');
let head = Game.creeps['head'];
let tail = Game.creeps['tail'];
if(head && tail) {
if(head.pull(tail) == OK) {
tail.move(head);
head.moveTo(TOP);
} else head.moveTo(tail);
}
}
to reproduce, simple put a spawn a bit below the top exit