Navigation

    forum

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

    M4SS

    @M4SS

    2
    Posts
    846
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    M4SS Follow

    Posts made by M4SS

    • RE: Harvester Roll Help

      @threen aha, okay yeah that makes sense, my next guess was going to be something along the lines of booleans. however as i'm finding out, they work a little differently then they do in C++ lol. thanks for the help! Ill see what I can do with this.

      posted in Help
      M4SS
    • Harvester Roll Help

      Quite a noob question im sure. Im new to coding, little experience in C++ (Arduino hobby) and so far have created this script, however, i would like my creep to fill up its inventory, then go to the controller and empty it completely. Ive tried everything my small brain can muster but cant figure out how. Would love any recommendations!

      module.exports.loop = function () {

      Game.spawns['Spawn1'].spawnCreep([WORK, CARRY, MOVE, MOVE], 'testCreep');

      var mycreep = Game.creeps['testCreep'];

      if (mycreep.store.getFreeCapacity() > 0) {

      var energysource = mycreep.pos.findClosestByPath(FIND_SOURCES); mycreep.moveTo(energysource); mycreep.harvest(energysource);

      } else { var homecontroller = mycreep.room.controller; mycreep.moveTo(homecontroller); mycreep.upgradeController(homecontroller); }

      }

      posted in Help
      M4SS