Advertisement
Guest User

Untitled

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