[Solved] Savern Brawl Help


#1

This is my code:

enemy = hero.findNearestEnemy()
while True:
    if enemy:
        hero.attack(enemy)
    else:
        hero.moveXY(47, 71)

But all my hero will do is kill the first enemy and then do nothing. Please help me figure this out.


#2

You have to find the enemy in the while loop. you are just finding one enemy before @Garv_Jain


#3

Thank you! It works now.


#4

no problem @Garv_Jain