"convient enemy" possible bug


#1

If I wear regular boots on this level, dude is too fast and don’t summon a soldiers, but should!!
So I bought superSlowShoes to pass it.

very possible it’s a bug and miscalculation on dev stage


#2

I think it’s not a speed bug. I just checked it with the Raider with Speed ring and the fastest boots.
Summon is speed independent. Could you show your code or give “sessionId”?


#3

sometime CC is laggy maybe it’s depend on memory installed on PC or something like that.


#4
// Ogres are hiding in woods. Protect the peasants.
// The last word in the peasants messages are a hint.

for (var x = 8; x <= 72; x += 16) {
    hero.moveXY(x, 22);
    // Peasants know whom to summon.
    var peasant = hero.findNearest(hero.findFriends());
    var message = peasant.message;
    if (message) {
        // Words are seaparated by whitespaces.
        var words = message.split(" ");
        // "words" is an array of words from the "message".
        // Get the last word. Its the required unit type.
        var superPower = words[words.length-1];
        // Summon the required unit type.
        hero.summon(superPower);
    }
}

for (var i = 0; i < hero.built.length; i++) {
    var unit = hero.built[i];
    var pos = {"x":unit.pos.x, "y": unit.pos.y};        
    // Command the unit to defend the unit position.
    hero.command(unit, "defend", pos);
}

// Defend the last point yourself:
while(true) {
  var enemy2 = hero.findNearestEnemy();
if (enemy2) {
    hero.attack(enemy2);
    }  
}

#5

It can be laggy, but it shouldn’t skip frames anyway. Could you reproduce that bug?


#6

I reload the browser, now it’s work fine %) somehow


#7

Hm, it’s weird. Please, if you see this bug again write sessionId and don’t change your state for that level. It could really help us to fix it. To get the sessionID for the level you can open dev console in your browser and find a string like

Generated random seed 5168930597 of type submissionCount from sessionIDs 581c3a7a1cf1982400aa06bb submissionCount 5

#8

let all the people move to one place , and command them fight with the enemy .


#9

Sorry, I didn’t get it. Could you explain it?


#10

command peasant to the center and the enemy won’t hurt it.


#11

Thanks. Fixed.
20chars