any help ?
– This function finds the nearest enemy and returns the distance to it.
local enemy = hero:findNearestEnemy()
–If there is no enemy, the function returns 0.
local result = 0
if enemy then
result = hero:distanceTo(enemy)
while true do
–save the result in the variable enemyDistance.
local enemyDistance = nearestEnemyDistance()
if enemyDistance > 0 then
–If the enemyDistance is greater than 0:
--// Say the value of enemyDistance variable. end