Help with Backwoods Bombardier


#1

Hi, I want help with Backwoods Bombardier. I am supposed to fire the canon at the enemies, But my “throw” command does not seem to work. Also i am confused, as to what command needs to be used for firing canons and how to point the location.
Please help. here is my code. Thank you.

 loop {
    var enemy = this.findNearestEnemy();
    if(enemy) {
        var pos = enemy.pos;
        x = enemy.pos.x;
        y = enemy.pos.y;
        // say the x and y position separated by a comma
        this.say( 62 +"," +51);
        this.say("Fire!");
    } else {
        this.say("Cease" + " Fire!");
        this.throw(enemy);
    }
}

#2

You have to use the x and y variables instead of hardcoded values (62, 51).

Just saying the coordinates is enough to make the artillery fire in this level, you don’t need the throw command.


#3

Got it. thanks a lot.