If not, how would a creep get the id of the spawn that's in their room?
pheonix
@pheonix
Posts made by pheonix
-
Does findExitTo work with room names?
-
Double spawning with two spawns?
So recently I had my room level up to RCL7 and I got a second spawn. My multi-room code works by looking at spawns, and I have variables that look at a number of creeps. But since creeps that are being spawned have no memory, and that spawning doesnt use all the energy in extensions, the second spawn makes a creep, which results in it going over the limit.
- else if(numberOfBuilders < 1){
- name = Game.spawns[spawnName].createCustomCreep(energy,'Builder')
- numberOfBuilders++
- }
-
Servers on the website?
I don't think you can join private servers on the screeps.com website correct? It is only through steam?
-
RE: Defining the Amount of Sources in a Room
Maybe you could try
let source = creep.room.find(FIND_SOURCES) let NumberOfSources = source.length
-
Trying to get energy out of everything but spawns, extensions, and towers
let structure = creep.pos.findClosestByPath(FIND_STRUCTURES, { filter: (s) => s.structureType != STRUCTURE_ROAD || STRUCTURE_SPAWN || STRUCTURE_EXTENSION || STRUCTURE_TOWER && s.energy > 0 });
So this is what I have to figure out what structures that store energy are, and then I have my creeps try to withdraw the energy. But it doesn't work, and when I had it console.log(structure) it returned two roads and their IDs, and now it is showing a link AND a road. Does a road have energy storage..?