Hi! I’m trying to define distance to the nearest enemy, and I think it should work even if there are no enemies, but I’m getting an error:
"Line 5, time 0.0: Find the distance to a target unit."
My code:
enemy = self.getNearestEnemy()
if not enemy:
return
dist = self.distanceTo(enemy)
Level: Hunter Triplets
Language: Python
OS: Windows 8.1
Google Chrome