I can’t move.
This is my code:
while true:
enemy = hero.findNearestEnemy
yPos = hero.pos.y
xPos = hero.pos.x
if enemy:
hero.attack(enemy)
else:
yPos += 5
xPos += 5
I can’t move.
This is my code:
while true:
enemy = hero.findNearestEnemy
yPos = hero.pos.y
xPos = hero.pos.x
if enemy:
hero.attack(enemy)
else:
yPos += 5
xPos += 5
I have () at the end of
enemy = hero.findNearestEnemy()
i had to type it all out.
You have to add a moveXY command at the end.