I can't make my bean move in any direction , please help!
EliseGuillot-Ry

I'm really new to coding, but since the Kajam is coming up I wanted to try figure out how to start using kaboom, as it seemed the easiest. I'm making the dino game tutorial right now, but I wanted to modify it a touch, so that as well as jumping, the bean could also move left and right if you pressed the arrow keys (I might also try make a thing where you can press the arrow key to duck, but i need to do this first). my code right now for jumping and moving left is:

keyPress("space", () => {
if (bean.grounded()) {
bean.jump();
}
});

keyPress("left", () => {
bean.move(LEFT, 240)
}
});

However when i click run, all that shows up is a white screen with an error! I'd really appreciate help with this, thanks in advance.

You are viewing a single comment. View All
Answered by MrVoo [earned 5 cycles]
View Answer
EliseGuillot-Ry

@MrVoo Thanks so much! I marked it as the answer because I can probably figure this out myself, but do you know how to make is keep moving if i hold down the left key? Don't worry if you can't, thanks!