I’m not sure what happened or why, but the code at the end of this level worked the first 4 times I ran it. Now, it’s giving me an error.
while True:
enemy = hero.findNearestEnemy()
friend = hero.findNearest(hero.findFriends())
friendPos = {'x':friend.pos.x, 'y':friend.pos.y}
if friend and hero.distanceTo(friend) > 5:
hero.move(friendPos)
if enemy and hero.distanceTo(enemy) < 5:
if hero.isReady("bash"):
hero.bash(enemy)
else:
hero.attack(enemy)
Is it possibly a gear problem? Wrong glasses? Wrong boots?
Really can’t figure this out and I’ve been at this on and off for days.