Hallo.
Maybe a bug.
Lang JS
First location
level Ping-Pong.
code:
while(true) {
hero.say(“fetch”);
hero.attack(“ball2”);
hero.moveRight(3);
hero.attack(“ball2”);
hero.moveLeft(3);
}
on the second cycle, the hero flies out of bounds
Howdy and welcome to the forum! In the future please be sure to post your code properly formatted. You can learn how here: [Essentials] How To Post/Format Your Code Correctly
Put your ‘hero.say’ statement before the ‘while’ loop. Right now, you have it inside the loop, so he is constantly stopping to speak, which is throwing your steps out of whack.
1 Like