Stuck in Cupboards of kithgard level


#1

Map: Kithgard Dugeon

Level: Cupboards of kithgard

Language: Python

OS: Windows 10 (Already tried with Google Chrome and MS Edge)

Problem:
The second ogre is getting suck in the corner and the skeleton is not attacking him. Already check the code from the Video Tutorial and is the same.

Code:
<>
hero.moveUp()
hero.moveRight(2)
hero.moveDown(2)

while True:
hero.attack(“Cupboard”)
</>

Need help with this.!

Cupboards_of_kithgard|690x426


#2

Hi, @Juan_Mulford, and welcome!

You can format your code when you type either by highlighting it and clicking the </> on the toolbar, or ctrl-shift-c. That’ll make it easier for people to review.

As for your question, if the formatting here is identical to your code, you need to indent the last line hero.attack('Cupboard') four spaces. Hope that helps.

(If it doesn’t, maybe it’s supposed to be 'cupboard' instead of 'Cupboard'.)


#3

Hi Shmoogy,

Thanks for your reply.

I don’t follow your instruction, sorry, but the code is OK. Four spaces are added to the last line.

The whole action is completed, as you can see from the previous image attached. The problem is that I am running out of time because the second Ogre never goes down to attack.

Cheers!!

Code|690x246


#4

OK… I solved this whit this code:

Still this is really a bug, due to this is not a clean code. I forced the hero to go back on move so the second Ogre could see me, but almost die doing this.


#5

Interesting… I went over to Kithgard, just to check it out, and for me it works fine…