Siege of stonehold - help - my hero is stuck

Hey everyone :raising_hand_woman:
I’ve been struggling with this level for a while now.
Read all the posts here on this level - nothing works - please help!

Whatever I do my hero is not moving anywhare. sometimes it has a red X under it, sometimes it does’nt.
if I ask it to move to a point first thing then it moves and get stuck there.
It does’nt fight ememies at all - not in cleave nor the regular attack. doesn’t even try to move towards them.

posting my code here (I’ve tried like at least twenty ways, it’s just the most recent) -

enemy = hero.findNearestEnemy()
cleaving = hero.isReady("cleave")
if enemy and cleaving:
    hero.cleave(enemy)
else:
    hero.attack(enemy)

flag = self.findFlag("green")
if flag:
    hero.pickUpFlag(flag)

I’d be happy for some guideness… Thanks!

2 Likes

I think you should write:

elif enemy:
    hero.attack(enemy)

And where is the loop?
Please, post your equipment here.

1 Like

Thanks, I’ll try and change that.

what do you mean?

2 Likes

I mean screenshot with your equipment

1 Like

2 Likes

OK, thanks. Did you try what I told you?

1 Like

oh my it was all just about the while loop.
god this level got me so devastated :joy:

thank you so much @DimaP - for the fast replay and being nice and helpful :pray:

2 Likes

You’re welcome, and congratulations with completing the level! :partying_face:

2 Likes

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.