@stevetrov lol Well that's embarrassing! Works great now. Thank you.
Cyprus
@Cyprus
2
Posts
713
Profile views
0
Followers
0
Following
Posts made by Cyprus
-
RE: costCallBack in creep.moveTo doesn't appear to do anything.
-
costCallBack in creep.moveTo doesn't appear to do anything.
I am trying to get some creeps to avoid going through Ramparts but when I add a costCallBack function to moveTo nothing changes. Am I using this wrong? Any help would be much appreciated.
creep.moveTo(target, {visualizePathStyle: {stroke: '#00ff00'}, costCallBack: function(roomName, cm)
{
var ramparts = Game.rooms[roomName].find(FIND_STRUCTURES, {filter: i => i.structureType == STRUCTURE_RAMPART});
ramparts.forEach(i => cm.set(i.pos.x, i.pos.y, 255));
}});