Hi Guys
I got problem how to move next to ruins, how to attack them?
Please help
I had a look, but my map differs much from one on your screenshot. Nothing like ruins)
If you are not trying to get the maximum coins, move back to your start point (the first red dot) and then navigate up and over to the X on the right of the map. Once you touch touch the X, the game ends.
Like Alexbrand, the map I had was much differentā¦I think this is normal and to be expected.
Also, based on your screenshot, it appears that no other coins are obtainableā¦the ones to the left of the X cannot be taken, because you would have to step on the X to get to them.
hi, thx for answer , I got a question, how to navigate( is there a special method) my hero to X point?
thx .
Hi @Zambi25, Welcome to the CodeCombat discourse.
I think you can navigate your way to the white X, without going past the ruins. In my seed (my version of the level), you can walk to places where it seems there are rocks, but in fact you can walk over them.
Iām not sure about this as I canāt play your level, but if you look at this screenshot you will see that I walk to places which appear to be in the middle of the rocks. Maybe you can walk up to the X continuing going diagonally through some of the rocks. if you see what I mean.
Maybe you still canāt, Iām not sureā¦ Have you tried reloading your code, then reloading the level to get a different seed?
Anyone can help me,? I ve still got a problem to past this level
I tried reloading my code, then reloading the level and got a same seed
Maybe is some of bug?? Please help me
There is no way to move diagonally here because of level equipment limitations. But try hero.moveLeft(2) from (44, 38). Maybe that was meant as creativity in level describe, idk) Coins in this level are like bread crumbs, they lead you to right path.
I had to change browser and log out of account to get to this version of lvl map. But itās possible to complete. There is no bug. Though, I donāt understand the purpose of such level design
Well done Zambi25! I wish I had known you could walk thru some of the obstacles when I played this levelā¦I passed it without, but would have been more satisfying to grab as much loot as possible
So, you can replay it)
I get maximum coins
I just solved a version of Twisted Canyon I donāt see above. In my version I can defeat the three enemies with a while loop which runs three times before our hero comes to the X mark.
the while loop starts after hero moveLeft to reach the first of the three enemies:
while(true) {
var enemy = hero.findNearestEnemy();
hero.attack(enemy);
hero.moveUp(2);
hero.moveDown(2);
hero.moveRight(2);
hero.moveUp();
hero.moveRight();
hero.moveUp();
hero.moveLeft();
}
the last line āhero.moveLeft();ā makes the hero walk left when coming to the x-mark, but the line is needed to defeat the three enemies. I was thinking about an if statement like:
if (hero postion != x:68, y:62) {
hero.moveLeft();
}
Do anyone have an idea how to solve it? I am complete beginner. Just if you know how to use coordinates in a if statement.
Howdy and welcome to the forum!
To speak to your opening comment, everyone gets a different starting āseedā, so it is quite rare when 2 playerās match maps. Mine is quite a bit different from what you are showing.
Another point, tho you might already know this, but just in case: some walls are illusions and can be walked through.
So, there are several different ways to do the if coordinates statement. āhero.posā is actually the vector of the heroās position. If you had your hero say it, it would look like ā{x: 68, y: 62, z: 1}ā. To keep it simple, try this method instead:
if (hero.pos.x != 68 && hero.pos.y != 62) {
hero.moveLeft();
}
I tested the code but it didnāt work, I checked and I got some odd code warning on the first line //commentā¦ I checked and I am in Python for this particular practise. I canāt change it back but I was in Javascript when I started. Perhaps a bug, I will log off and in tomorrow to see again. But thanks for replying, I am sure it will work.
If you switched languages, understand that your code will not be auto-converted. It will remain the original language and you will have to convert it.
// is the code for commenting in JS
# is the code for commenting in PY
I did not switch language. Always in Javascript and that is what I coded in until I wanted to solve the problem you helped me with. When I returned to enter the code, it was in Python. Moving back to Kithgard Dungeon, the rest of the practise levels are still in Javascript. Only Twisted Canyon changes to Python. A known bug?
Wowā¦first Iāve heard of this happening, automatically. However, besides changing the language via the Game Menu, you can also specify the language via the link, like this:
https://codecombat.com/play/level/twisted-canyon?codeLanguage=javascript
So, if you encounter such a switch again, use the ācodeLanguageā switch to change it back. It works for all supported coding languages.
That link you sent me worked.
I added the the line of code and it worked like a charmā¦ I mean gem.
I have another issue in the program that was discussed a year ago. It is the last practise level in the Game Develop 1:
In Tabula Raza:
//Gems
game.addCollectGoal(5);
game.spawnXY(āgemā, 68, 23);
game.spawnXY(āgemā, 60, 23);
game.spawnXY(āgemā, 52, 23);
game.spawnXY(āgemā, 52, 14);
game.spawnXY(āgemā, 52, 10);
//Trackers
ui.track(game, ācollectedā);
I can collect the gems but they donāt appear in the ui display as Collected (there is a ā0ā but not counting).
I was in the forum and they had this problem one year ago and I seem to have the same problem. Is there a solution. The collect gem code works fine in practise level ā5. Gemactularā:
// Add a goal to collect the gems using game.addCollectGoal()
game.addCollectGoal(10);
// Spawn 3 gems across the level for the player to collect:
game.spawnXY(āgemā, 28, 28);
game.spawnXY(āgemā, 28, 10);
game.spawnXY(āgemā, 64, 10);
game.spawnXY(āgemā, 64, 28);
game.spawnXY(āgemā, 58, 52);
game.spawnXY(āgemā, 44, 44);
game.spawnXY(āgemā, 58, 52);
game.spawnXY(āgemā, 28, 59);
game.spawnXY(āgemā, 28, 44);
game.spawnXY(āgemā, 19, 44);
Why is it a difference here? I promised to post your answr in the forum for people who wonder the same.
Kind regards
Ćrjan