Hey everyone, I’m new here and to coding, I’m trying to figure out if something is wrong with my code.
loop:
enemy = self.findNearestEnemy()
flag = self.findFlag()
if enemy:
distance = self.distanceTo(enemy)
if distance < 10:
if self.isReady("cleave"):
self.cleave(enemy)
elif enemy:
self.attack(enemy)
elif flag:
self.pickUpFlag(flag)
I’m not getting any errors, but after he cleaves, he’ll only attack once, and then just stands there until cleave is ready again. How can I make it so he will attack more than once?