@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.
Posts made by M4SS
-
RE: Harvester Roll Help
-
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); }
}