I have trouble with certain levels. I actually am stuck on a level right now. This is for everyone who has trouble with Code Combat levels, like me. Hopefuly we can help each other.
The best way to get help with a level is to first, search this board for the level name that you’re stuck on and see if someone else has had a similar problem. If you still can’t find what you’re looking for then post your code in a new thread asking for help. Make sure you post your code properly using the </> button. Include any error message you’re getting or what your hero character is doing (or not doing).
MunkeyShynes, I lost the code I was using. I was doing Multiplayer Arenas, but I want to beat this level. I just can’t understand how. Also, I have a question about the items you buy/unlock with gems.
If you have a question, ask. In spite of my best efforts to do so, I can’t read minds.
Sorry. I wanted to make sure I had your attention so I could ask. I have the Simple Katana and the Defensive Infantry Shield. Whenever I go to the Cavern Survival on Kithard Dungeon, I’ll have those two items for the first battle and then my items change back to the ones I had before. Why does this happen?
Hmmmm, that is odd. So you select those items, and you can run your code using the run button and the items are still there, but when you use the submit button, the items are not there? Is that correct?
Sorta. After I submit, and enter a new battle, the items change back the the old ones.
Mod edit: Please do not post for assistance in multiple locations for the same issue. You will not receive assistance faster with multiple posts. Also, please be sure that the help you are requesting is relevant to the thread you are posting in. This creates confusion.
Oh! I’m so sorry. I apologize for not responding. I wasn’t sure who you were talking to. I thought you might’ve been talking to ducky. It many have not worked because you repeated it three times.
hero.moveUp() while True: hero.moveRight() hero.moveRight() hero.moveRight() hero.moveUp() hero.say("One") hero.moveDown() hero.moveRight() hero.say("Sesame") hero.moveRight() hero.moveRight() hero.moveUp() hero.moveUp() hero.moveUp() enemy = hero.findNearestEnemy() if enemy: hero.attack(enemy) hero.moveLeft() hero.moveLeft() hero.moveLeft() hero.moveLeft() hero.moveUp() hero.moveUp() hero.moveUp()
As you can see. my code is working well on the first roll.
why the code doesn’t working on the second roll?
It could be a bug. I haven’t done this level yet, so I cannot help you with my own code. Again, could be a bug. Using the while true loop, everything you put inside the loop, the character does to an extent. I created the perfect attack loop for my characters items, but it took awhile to catch on in the game itself. I’m not sure what it is. I think you should message ducky and ask for his help. I apoligize if I made things worse, giving you the while true loop idea.