![]() ![]() This is making my hero not even move and I end up running out of time. Now find the nearest enemy and tell them to go away.',' enemy hero.findNearestEnemy()',' if enemy:',' hero.say('To go away, ' + enemy. while hero.gold > stOf('soldier'): hero.summon('soldier') soldiers hero. PythonCoding March 28, 2020, 4:12am 1 Summon some soldiers, then direct them to your base. However, one of the lines that they gave us automatically “pet.on(“spawn”, onSpawn)” seems to have an error, saying that pet is not defined. CodeCombat Discourse SOLVED Help Cloudrip Commander Codecombat Python. hero.moveXY(x, y) Search a coin and if you see it, build a 'fire-trap'. def maybeBuildTrap(x, y): Move to the given x,y postion. ![]() Patrol and place traps ONLY if you see a coin. I put the two lines in which they had us write out in bold. instead of just using: if enemy: hero.attack (enemy) Try using checks like if-distance-from-enemy < 20 & changing the hero to a warrior. Learn Python, JavaScript, and HTML as you solve puzzles and learn to make your own coding games and websites. If someItem and hero.health > hero.maxHealth / 3: #Mushrooms are toxic, don’t collect them too quickly. # Make the pet fetch the potion if it exists: if hero.time < 10: enemy hero.findNearestEnemy () if enemy: hero. while True: If it’s the first 10 seconds, attack. Use your new skill to choose what to do: hero.time. # Pets can find the nearest item by its type. Needing help for Level 47 Keeping time CS3 - Level Help - CodeCombat Discourse. #This function makes the pet fetch potions for you. You only have to fill out two lines it asks you to, and I do those, but for some reason, one of the lines that it gave us automatically seems to be not working. I am getting stuck on the level Sand Mushrooms in CS3 (Desert). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |