I have a student creating a space shooter that has a boss. When the boss reaches the right side of the screen, it’s supposed to switch directions & go left, but instead gets stuck. We’ve tried conditionals with the counter pattern, conditionals with velocity, creating edge sprites for it to bounce off of. I am stumped. It keeps getting stuck on the right side of the screen. Any suggestions?
your issue pertains to how the velocity of the boss is being constantly set and you not dealing with changing the velocity
we can fix this by checking if the velocity is 0 in order to start it from moving
and using bounceOff to automatically deal with velocity reversals when the sprite hits the edges