Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 if(!(creep.fatigue > 0))
  2.                 {
  3.                     if(!creep.memory.lastposition)
  4.                     {
  5.                        
  6.                     }
  7.                     else if(creep.memory.lastposition.x == creep.pos.x && creep.memory.lastposition.y == creep.pos.y)
  8.                     {
  9.                         console.log("stuck");
  10.                         setTargetandPath(creep);
  11.                         Game.spawns['Spawn1'].room.visual.circle(creep.pos,  {fill: 'transparent', radius: 0.1, stroke: 'red', opacity: 1});
  12.                     }
  13.  
  14.                     creep.moveByPath(creep.memory.path);
  15.  
  16.                     creep.memory.path.shift();
  17.                    
  18.                     creep.memory.lastposition = creep.pos;
  19.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement