Here you go, this should work.
- Removed collision set-up and constants from loop
- changed position of some commands for a correct program flow.
Sync On
Sync Rate 30
Backdrop on
Color Backdrop RGB(0,150,0)
Hide Mouse
REM Make Boxes for boundaries
REM Vert. 1
Make object box 4,1,1,27
Color object 4,RGB(0,100,0)
Position object 4,-15,0,0
REM Vert. 2
Make object box 5,1,1,27
Color object 5,RGB(0,100,0)
Position object 5,15,0,0
REM Horiz. 1
Make Object Box 6,30,1,1
Color Object 6,RGB(0,100,0)
Position object 6,0,0,11
REM Horiz. 2
Make Object Box 7,30,1,1
Color Object 7,RGB(0,100,0)
Position object 7,0,0,-11
REM make player paddle
Make Object Box 1,1,1,3
Color Object 1,RGB(0,0,225)
Position Object 1,-10,0,0
REM make opponent paddle
Make Object box 2,1,1,3
Color Object 2,RGB(225,0,0)
Position Object 2,10,0,0
REM Make Ball
Make Object sphere 3,2
Position Object 3,0,0,0
Color OBject 3,RGB(225,225,225)
` ===== removed from inside of loop =====
Set object collision to boxes 2
Set Object Collision to Boxes 1
Set Object Collision to Spheres 3
a3#=-90
SPD#=0.5
REM Main Loop
Do
REM position Camera
Position Camera 0,17,0
Point Camera 0,0,0
Rotate Camera 90,0,0
REM Store Player's, Ball's, and Opponent's Positions
Y#=Object Position y(1)
X#=Object Position x(1)
Z#=Object Position z(1)
X2#=Object Position x(2)
Y2#=Object Position y(2)
Z2#=Object Position z(2)
X3#=Object Position x(3)
Y3#=Object Position y(3)
Z3#=Object Position z(3)
`removed ===== a3#=Object Angle y(3) =====
REM Store Player's Controls
If Upkey()=1 AND Y#<2 then move object 1,Y#+1
If Downkey()=1 AND Y#>-2 then move object 1,Y#-1
REM Collisions
REM Player
If object collision(1,0)>1 then position object 1,X#,Y#,Z#
REM ===== check the ball collision =====
If object collision(3,0)>0 then a3#=a3#-180
REM Opponent
If object Collision(2,0)>1 then position object 2,X2#,Y2#,Z2#
a3#=wrapvalue(a3#)
`===== moved to calculate using new angle =====
X3#=newxvalue(X3#,a3#,SPD#)
Z3#=newzvalue(Z3#,a3#,SPD#)
Position Object 3,X3#,0,Z3#
yrotate object 3,a3#
REM Refresh Screen
Sync
Loop
Home computers are being called upon to perform many new functions, including the consumption of homework formerly eaten by the dog.