Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. if(!(creep.fatigue > 0))
  2. {
  3. if(!creep.memory.position)
  4. {
  5. creep.memory.position = creep.pos;
  6. }
  7. else if((creep.pos.x == creep.memory.position.x && creep.pos.y == creep.memory.position.y) && (!creep.pos.isNearTo(sources)) && (!creep.spawning))
  8. {
  9. if(Game.time >= creep.memory.times +1)//Alle (1) Ticks wird der Stucktimer um 1 erhöht.
  10. {
  11. creep.memory.times = Game.time;
  12. creep.memory.stucktimer = creep.memory.stucktimer + 1;
  13. }
  14. if(creep.memory.stucktimer >= 3)
  15. {
  16. creep.say("Stuck!");
  17. creep.memory.path = null;
  18. }
  19. }
  20. else
  21. {
  22. creep.memory.stucktimer = 0;
  23. }
  24. creep.memory.position = creep.pos; //Jeden Tick wird die creep Position in den Spiecher übertragen
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement