Debugging a code created for Game lab

One of my students is creating a game on game lab.

Link to the project or level: Game Lab - Code.org
What I expect to happen: In level 5, when the basketball is bouncing on the trampoline, it is supposed to bounce off the top left edge of the screen and then “teleport” to the bottom right of the screen. It should also bounce off the left edge if it touches the left edge. (lines 140-142 and 146-149 of code).

What actually happens: Instead of bouncing off the edges, it just bounces off the trampoline. The sprite doesn’t move to the bottom right corner of the screen.

What I’ve tried: I changed the order of the backgrounds to see if it was something with that. It wasn’t. I also tried different equal statements (>=) to see if it changed anything. It didn’t.

Thanks for any help/suggestions!

How do I get past level 3? I can’t get to level 5 to see what is happening.

Mike

@mwood you can skip by modifying the score in the console, 10 is the number for level 5

as for @stephanie.hodgson you’ve got some weird physics but anyways the issue is collision precedence

function collisions() {
  if (level !== 5) {
    basketball.bounceOff(topEdge);
  }
  basketball.bounceOff(bottomEdge);
  basketball.bounceOff(rightEdge);
  basketball.bounceOff(leftEdge);
}

your collision handler seems to be bouncing the ball faster than the second check you have in your code

Varrience