Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

The Final Kithmaze help

#65

My character goes back and walks into the wall:

while True:
    
    
    
    hero.moveRight()
    hero.moveUp()
    enemy = hero.findNearestEnemy()
    hero.attack(enemy)
    hero.moveDown(2)
    


0 Likes

#66

Have you tried experimenting with different movements yourself?

0 Likes

#67

Yes, Chaboi_3000, I did try that. I tried to spilt the movements between two whiletrue loops, but it didn’t work.

0 Likes

#68

First. You do not have a loop to begin your code. Also one hero.moveRight() statement and one hero.moveUp() statement is not nearly enough to complete the level. Also you are forgetting and if statement in your code. Look at your code and the level. There are a lot more hero.moveDIRECTION()'s that u need in your code. You are really close tho.

0 Likes

#69

Thank you Luke10. That helps to know I’m close. And thanks for the advice.

0 Likes

#70

You are welcome. You can post here again or message me if you need more help. Ill be happy to!

1 Like

#71

the real begining is this

hero.moveRight();
hero.moveUp();
var enemy = hero.findNearestEnemy();
hero.attack(enemy);
hero.attack(enemy);

0 Likes

#72

If you are having an issue with your code, please format it according to the FAQ.

Please specify how this is meant to help. As a reminder, please do not post the working code for a level. I know you are not doing this I just want to remind you.

Thanks!
-@Luke10

0 Likes

#73

this helps me so much thank

0 Likes