The information at the beginning of the level states that we need to write the function runBetween from scratch. But, once you enter the level, the comments say:
// Write the event function onSpawn for the pet.
// This function should make the wolf run back and forth:
// First, run to the right mark, then the left one:
I have tried to solve it both ways, with runBetween and onSpawn, does anyone have a suggestion or idea of what I doing wrong?
Thank you in advance.
pet.on(“spawn”, runBetween);
function runBetween(event) {
while (true) {
pet.moveXY(48,8);
pet.moveXY(11,8);
}
while (true) {
hero.say(“Run!!!”);
hero.say(“Faster!”);
}
}