I'm trying to make a pong program but the ball won't regester that it has touched the left edge which I have colored blue. My code for it currently is
[when flag clicked]
set player 1 to (0)
set player 2 to (0)
forever
move (3) steps
if on edge, bounce
if <touching sprite1>
play sound Laser2
turn 180 degrees
point in direction (pick random (70) to (180))
if <touching sprite2>
play sound Laser2
turn 180 degrees
point in direction (pick random (-70) to (-180))
[when flag clicked]
go to x:-170 y:-20
forever
if <touching color red>
change player 1 by (1)
go to x:-170 y:-20
[when flag clicked]
forever
if <touching color blue>
change player 2 by (1)
go to x:170 y: -20
Is my problem the fact that the right edge isn't touching blue?
Offline
The first thing that springs to mind is to check that your edge is in fact the exact same blue as you "touching" script.
And also that the ball isn't bouncing due to the "bounce" command before it touches the blue area.
Offline