I have been stuck on this level for several days. I have even visited several of the tutorials on YouTube, and their code is exactly the same. Except, their code worked, and mine doesn’t. Can someone help me please? This is what my code looks like:
enemy = hero.findNearestEnemy()
pass # Replace this with your own code.
# Find the distance to the enemy with distanceTo.
distance = hero.distanceTo(enemy)
# If the distance is less than 5 meters…
if distance < 5:
# … if “cleave” is ready, cleave!
# … else, just attack.
this is the link to the video that has the same code as me: