e.extra.node.loc is undefined
What in the world…
e.extra.node.loc is undefined
What in the world…
What level is this on?
Also please post your code with formatting according to the FAQ.
Blind Distance
def nearestEnemyDistance():
enemy = hero.findNearestEnemy()
result = 0
if enemy:
result = hero.distanceTo(enemy)
return result
while True:
enemyDistance = nearestEnemyDistance()
enemy = hero.findNearestEnemy()
if enemy:
if hero.distanceTo(enemy) > 20.:
hero.say(distancetoenemy)= hero.findNearestEnemy()
somehow the first part is not formatting properly when i paste it here.
I believe: hero.say(distancetoenemy)= hero.findNearestEnemy() is incorrect. Please double check your code