![]() ![]() Sorry for the false alarm but I still hope we can get the list of pet’s methods. If our glasses doesn’t have findNearestItem/findNearestEnemy, than the pet can’t use it too, am I correct?Įdit: I reload the level and it works with the default code (pet.findNearestByType). ![]() In the previous levels I think it depends on our glasses. Var soldier = pet.findNearest(hero.findByType("soldier")) Īlso, it would be helpful if we can get the list of methods our pet can do. var archer = pet.findNearest(hero.findByType("archer")) Then, based on what the comments say, find Agata’s number and say it to Agata. After that doesn’t work, I switch to hero.findByType. That is why use a variable akihikokahyaba.So right above hero.moveXY(30,39) stament, should be something like this variable erz / 4.Then you move to Simonyi and say the variable. I’m not sure if pet also has findByType method. ![]() Var soldier = pet.findNearest(pet.findByType("soldier")) Var soldier = pet.findNearestByType("soldier") īut the pet doesn’t seem to recognize this method (findNearestByType)? So I changed it to: var archer = pet.findNearest(pet.findByType("archer")) The attached codes are solutions to Code Combat levels and are written in Python. In CodeCombat, using strings and hero. 35: 512: SeptemNeed help on Friend and Foe. 55: 548: SeptemHunting party, I am hunting for answers Level Help. Strings are structures of 'text inside quotes'.Students will use the string concatenation operator, + to build a longer string out of two shorter strings, or to combine a string and a variable. CodeCombat Discourse Computer Science 3- Air rescue service. Pet should find the health potion (type is 'potion'): potion pet.findNearestByType('potion') and fetch it: pet.fetch(potion) Pet should find the gold key (type is 'gold-key'): item pet.findNearestByType. String concatenation is used to add, or combine, two strings together. In the default code, I have: var archer = pet.findNearestByType("archer") I don’t know what is wrong with my code, I am on the level Mushroom Noise in the desert. 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. It won’t go left or right, even after I use pet.moveXY. Learn Python, JavaScript, and HTML as you solve puzzles and learn to make your own coding games and websites. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |