Well after executing the code and inspecting the memory of a newly spawned creep the creep does not have a role set...
xbelt
@xbelt
3
Posts
616
Profile views
0
Followers
0
Following
Posts made by xbelt
-
RE: Setting creep role in Memory not working
-
RE: Setting creep role in Memory not working
I already tried the exact code from the documentation:
Game.spawns.Spawn1.createCreep([WORK, WORK, WORK, CARRY, MOVE], null, {role: 'harvester'});
This still does not work...
-
Setting creep role in Memory not working
Hello,
I tried automating the creation of creeps but I still fail to set the role of a creep correctly.
I use different approaches from the forum and tutorials and the still do not work:
memory = {};
memory['role'] = "harvester";
var creep = Game.spawns.Spawn1.createCreep([WORK, WORK, WORK, CARRY, MOVE], null, memory);
if (_.isString(creep) && Memory.creeps[creep]){
Memory.creeps[creep].role = 'harvester';
}