Hero not doing anything


#1

I’m on the final forest level and my hero isn’t doing anything at all. There are no syntax errors. What’s up? Thanks.

flag = self.findFlag()
enemy = self.findNearest(self.findEnemies())
loop:
    if flag:
        #pos = flag.pos
        #fx = pos.x
        #fy = pos.y
        #self.moveXY(fx, fy)
        self.pickUpFlag(flag)
    elif enemy:
        if self.isReady("cleave"):
            self.cleave(enemy)
        elif self.isReady("bash"):
            self.bash(enemy)
        else:
            self.attack(enemy)

#2

You need to find the things inside the loop or you only do that once.


#3

Thought it was something dumb. Thanks.