Navigation

    forum

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

    shar

    @shar

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

    shar Follow

    Posts made by shar

    • Can't find containers on my map

      I am trying to get my creeps to withdraw energy from my containers to move to extensions for spawning, but my code isn't finding any of the containers, even though they're full and the creeps are standing right next to them, a search for containers or a call to withdraw returns null. These are the two types of code I tried. var targets = creep.room.find(FIND_STRUCTURES, {

                  filter: (structure) => {
                      return 
                          (structure.structureType == STRUCTURE_CONTAINER && structure.store[RESOURCE_ENERGY] > 0);}}
                  )
      
              var resource = creep.pos.findClosestByRange(STRUCTURE_CONTAINER);
      posted in Help
      shar