thanks, i took your advice, and choose to use all sprites, but i still dont get the collsiosn detection, ive got it so everything is sprites, even the boundaries, so i cna use the command "sprite hit()"
when i use this command to check if it has hit the bat though, i jus minus 5 from the x direction, but this means the ball jus gets stuck, i need a way for it to change direction, until it hits another object, i can only make it change direction whilst its hitting the object.
heres the code
Rem Project: Pong pro
Rem Created: 08/04/2004 18:46:46
Rem ***** Main Source File *****
`Settings
sync on
set display mode 1024, 768, 16
py = 334
cy = 334
bx = 100
by = 100
`Load image of players bat
load image "bat.bmp", 1, 1
sprite 1, 996, py, 1
`Load image of computers bat
load image "bat.bmp", 2, 1
sprite 2, 24, cy, 2
`Load image of ball
load image "ball.bmp", 3,1
sprite 3, 100, 100, 3
`Load image of top border
load image "topborder.bmp", 4, 1
sprite 4, 17, 19, 4
`Load image of bottom border
load image "topborder.bmp", 5, 1
sprite 5, 17, 744, 5
`Load image of right border
load image "sideborder.bmp", 6, 1
sprite 6, 1011, 19,6
`Load image of left border
load image "sideborder.bmp", 7, 1
sprite 7, 17, 19, 7
`Main Loop
do
`Set player movement and limitations
if py < 24 then py = py + 5
if py > 640 then py = py - 5
if upkey() = 1 then py = py - 5
if downkey() = 1 then py = py + 5
sprite 1, 1000, py, 1
`Set Player 2 movement and limitations
if cy < 24 then cy = cy + 5
if cy > 640 then cy = cy - 5
if keystate(17) = 1 then cy = cy - 5
if keystate(31) = 1 then cy = cy + 5
sprite 2,24,cy,2
`Create Object collision
sprite 3, bx, 100, 3
if sprite hit (3, 1) = 1 then a=1
if sprite hit(3,1) = 0 then bx = bx + 5
sync
loop
id appreciate any help
thanks