Stillness In Motion 2.0 in Backwoods Forest

while True:

enemy = self.findNearestEnemy()
if enemy:
    distance = self.distanceTo(enemy)
    if distance < 6 :
        self.attack(enemy)
    else:                       # this is line 15
            self.shield()

    pass
else:
    self.moveXY(40, 34)
1 Like

Please give more information about your problem such as what his happening when you run your code and the errors that the system gives when you run your code. A screenshot would be helpful as well.

-@Luke10

1 Like
else:                              #this is line 15
            self.shield()

should be

else:
    self.shield()
2 Likes