I've also had this happen with the console
and memory
tabs.
Only from the web client, and it appear to be if I've clicked on the tabs before the page has finished loading completely.
I've also had this happen with the console
and memory
tabs.
Only from the web client, and it appear to be if I've clicked on the tabs before the page has finished loading completely.
You can use a state which only changes when the creep is either completely full, or completely empty.
eg. (completely untested)
module.exports.loop = function () {
Game.spawns['Spawn1'].spawnCreep([WORK, CARRY, MOVE, MOVE], 'testCreep');
var mycreep = Game.creeps['testCreep'];
if (mycreep.store.getFreeCapacity() === 0) {
mycreep.memory.state = 'UPGRADE';
}
else if (mycreep.store.getUsedCapacity() === 0) {
mycreep.memory.state = 'HARVEST';
}
if (mycreep.memory.state === 'HARVEST') {
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);
}
}
Also, you'll get a much quicker response from the #help
channel of Slack (https://screeps.slack.com/).
Seems like it might be any withdraw-able object.
Looks like a NaN
from https://github.com/screeps/engine/blob/master/src/processor/intents/creeps/withdraw.js#L13 .
Causing both creep store and target store of that resource to also be NaN
.
https://github.com/screeps/engine/blob/master/src/processor/intents/creeps/withdraw.js#L47
https://github.com/screeps/engine/blob/master/src/processor/intents/creeps/withdraw.js#L50
Thanks @tigga, that makes sense.
I've just found a previous discussion about it as well.
https://screeps.com/forum/topic/273/discussion-spawn-insta-kill-mechanic
Seems wrong that a small creep can destroy a large attacker creep.
If I build 7 bulky walls around my spawn, I could kill any melee attacker that didn't know to kill the walls before the spawn...
I've noticed what I believe is a bug.
If a spawn surrounded by 7 friendly creeps and 1 hostile creep spawns an 8th friendly creep, the hostile one is overwritten.
See here -> https://screeps.com/a/#!/history/shard1/W41N51?t=6947136
Ringo86's Brawler6946601 is there at 6947136, and then replaced with Blaugaard's harvester6946993 at 6947137.
Perhaps this is an intended interaction that I am not aware of.
Cheers