Creep moves off exit but still room swaps on the next tick



  • The deliverer on the east edge of my room is being room swapped even after moving off of the exit tile :<

    https://screeps.com/a/#!/history/E15S13?t=6788693

    Not sure if I'm misunderstanding the exit mechanics, but I'm not sure what I'm doing wrong. This is using the same code as my other inter-room creeps, which don't seem to have this problem.

     

     



  • Update: I was missing a return statement which caused my creeps to oscillate between rooms. This still seems like a display bug, since my creeps definitely shouldn't have been displayed as moving off of the exit (the real effect of the code was to sit on the exit oscillating between rooms).


  • SUN

    It's not a bug, but a non-obvious behaviour of an exit, that is not documented anywhere.

    To oscillate between rooms, a creep should not move, just stay calm at an exit.
    When you creep moves somewhere, it leaves the exit area.



  • I think you've misread the problem. The effect of my code was to stay on the exit (because it was bugged), but the creep is displayed as moving off of it, then swapping to the other room while not on the exit. This is plainly seen from  the history link I posted. The bug isn't in the room-swap behavior, it's in the display behavior.

    Look at this link: no creep on the right edge of the map: https://screeps.com/a/#!/history/E15S13?t=6788694

    Move forward one tick to https://screeps.com/a/#!/history/E15S13?t=6788695

    And there's a creep at 48, 12, which is impossible in my understanding of creep move mechanics (absolute maximum move speed of 1 tile per tick)


  • SUN

    You're right, I've misread the problem.
    It's hard to say anything until there is a piece of code that moves your creep.

    I'm almost sure, that your creep had a .move(LEFT)/.move(RIGHT) commands executed (or moveTo() or moveByPath(), etc) that tick.
    If not - it looks like a bug definetly.

    Can you please doublecheck that a creep is not commanded to move, then publish the creep's movement code?