Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. skovborg
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    skovborg

    @skovborg

    1
    Posts
    874
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    skovborg Follow

    Posts made by skovborg

    • findClosestByPath returns an object, but can't find the path

      As the title suggests, a creep can find the object closest by path, but can't find the path to the object?

      Context is a creep just entering a new room, and looking for a source to harvest. I refactored the code to find the error, so don't think about the specifics too much.

      Relevant code:

      0_1638747328331_screeps.PNG

      I don't understand how creep.pos.findClosestByPath can return an instance of an object, but creep.moveTo(object) can't find a path.

      The relevant room; creep position drawn in red

      0_1638748673850_room.PNG

      posted in Help
      skovborg