Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!(creep.fatigue > 0))
- {
- if(!creep.memory.position)
- {
- creep.memory.position = creep.pos;
- }
- else if((creep.pos.x == creep.memory.position.x && creep.pos.y == creep.memory.position.y) && (!creep.pos.isNearTo(sources)) && (!creep.spawning))
- {
- if(Game.time >= creep.memory.times +1)//Alle (1) Ticks wird der Stucktimer um 1 erhöht.
- {
- creep.memory.times = Game.time;
- creep.memory.stucktimer = creep.memory.stucktimer + 1;
- }
- if(creep.memory.stucktimer >= 3)
- {
- creep.say("Stuck!");
- creep.memory.path = null;
- }
- }
- else
- {
- creep.memory.stucktimer = 0;
- }
- creep.memory.position = creep.pos; //Jeden Tick wird die creep Position in den Spiecher übertragen
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement