Can someone send me the code for this level
This board isn’t here to provide solutions just so that you can move on to the next level. It’s here to help you find the solutions so that when you move to the next level you know how to find the solution on your own. You can’t learn to code if you don’t learn how to figure things out. Being given solutions is counter-productive to this goal. Backwoods Forest is quite easy compared to Sarven Desert and if you don’t learn the basics in this campaign, you’ll never progress in the Desert and forget Cloudrip Mountain.
Take the directions one step at a time. Don’t look at the whole thing at once or it can seem overwhelming.
- Move to the bottom X mark.
Okay, that’s easy. Just use the moveXY method to move to the bottom X coordinates.
- Create a variable named bottomEnemy and find the nearest enemy.
Easy peazy. You have an example of how to do this on line 15.
- Use the checkAndAttack function, and include the bottomEnemy variable.
Simple. Just use the exact same format that they have in line 16, except use your new variable.
Three short lines of code is all you need. Be sure to tab it over so that it’s inside the while True loop. If it’s not working, post your progress here and we’ll keep assisting until you get it.
appreciate it. i wasnt connecting it to the while true loop
Thank you so much.
My mistake was i forgot to add 4 spaces before the lines.
I had an error message for the bottom check-and-attack function but when it was said that there was an example on the line #15 or 16, I solved the error.
Thank you very much