Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!(creep.fatigue > 0))
- {
- if(!creep.memory.lastposition)
- {
- }
- else if(creep.memory.lastposition.x == creep.pos.x && creep.memory.lastposition.y == creep.pos.y)
- {
- console.log("stuck");
- setTargetandPath(creep);
- Game.spawns['Spawn1'].room.visual.circle(creep.pos, {fill: 'transparent', radius: 0.1, stroke: 'red', opacity: 1});
- }
- creep.moveByPath(creep.memory.path);
- creep.memory.path.shift();
- creep.memory.lastposition = creep.pos;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement