Hello! new to the forums. When I place a flag down in the Rich Forager level, my hero moves to the flag but then he doesn’t attack anything. He just stands at the flag and lets himself get beaten down. Is it a problem in my code or what? I’m not sure if it’s a bug or i’m doing something wrong.
loop: flag = self.findFlag() enemy = self.findNearestEnemy() item = self.findNearestItem() if flag: fpos = flag.pos fx = fpos.x fy = fpos.y self.moveXY(fx, fy) elif enemy: self.attack(enemy) elif item: ipos = item.pos ix = ipos.x iy = ipos.y self.moveXY(ix, iy)