Hey i’m back. I was having a lot of trouble on the levels so i went back to the basics to get better. Any way i have been playing the new campaign(btw finally) and i noticed in one level the code:
loop {
var enemy = this.findNearestEnemy();
var distance = this.distanceTo(enemy);
if (distance < 10) {
this.attack(enemy);
}
else {
this.moveXY(40, 37);
but now in later levels it doesn’t work it says target is not specified, null or something along those lines and i dont know why. in the codex or whatever that book is called it has this code
else if (this.isReady("cleave") && this.distanceTo(enemy) < 10) {
this.cleave(enemy);
}
and i doesn’t work no matter what i do like make a distance variable. i dont understand also recently the var item = this.findNearestItem();
doesn’t work anymore but it was working fine a day ago either im doing something wrong or the code in the campaign is messed up