Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Has anyone used this at the university level?

its not there there i only see my top hot bar

Could you post a picture. That would help.

Tell the wizard the distance to the coming ogres.

This function finds the nearest enemy and returns the distance to it.

If there is no enemy, the function returns 0.

def nearestEnemyDistance():
enemy = hero.findNearestEnemy()
result = 0
if enemy:
result = hero.distanceTo(enemy)
return result

while True:
# Call nearestEnemyDistance() and
# save the result in the variable enemyDistance.
enemyDistance = nearestEnemyDistance()
# If the enemyDistance is greater than 0:

    # Say the value of enemyDistance variable.

Please put this in FAQ formatting by editing your message and highlighting your text, then, pressing the </> button to format it. Without that, it is difficult for me to help because it could be an indenting issue.

Also, I meant a picture of what you see on the Home Page would help

ok i will do that right a way