I know there are same topics with my problem I looked at them but I couldn’t figure out the answer please help!
while True:
friend = hero.findNearestFriend()
if friend:
hero.say("To battle, " + friend.id + "!")
# Now find the nearest enemy and tell them to go away.
else:
enemy = hero.findNearestEnemy()
hero.say("Go away, " + enemy.id + "!")
My problem is that my hero doesn’t tell the orges to go away. I also tried to code so that my hero toll the villagers/ peasant to attack, but that didn’t work either. It probably is some silly mistake that I made but I can figure it out.
Thanks if you could hint me something!