thanks to everyone who posted on this topic im sure its helped others too.
now i have a even bigger problem, im working on a pratice pong game
everything is great so far but moving the ball randomly is becoming to be a headache ive tried alot of code to get the ball moving randomly on its own
Rem Project: PONG
Rem Created: Sunday, October 24, 2010
Rem ***** Main Source File *****
sync on
sync rate 45
set display mode 800,800,32
`LOADING IMAGES AND POSITIONING THEM
load image "padlepong.jpg",1
load image "pongball.jpg",3
paste image 3,400,400,1
sprite 3,388,380,3
scale sprite 3,40
paste image 1,10,350
sprite 1,10,350,1
load image "padlepong.jpg",2
paste image 2,350,100,1
sprite 2,760,350,2
`THIS IS MY MAIN LOOP
do
cls rgb (255,25,10)
if upkey() = 1 then move sprite 1,6
if downkey() = 1 then move sprite 1,-6
if keystate(17) = 1 then move sprite 2,6
if keystate(31) = 1 then move sprite 2,-6
line 400,800,400,1
circle 400,400,100
sync
loop
thats what i got so far, i have a idea of how to create collision hit with ball and player, but for now its getting that ball moving.
if xpos = 0 then move sprite 3,3
if ypos = 0 then move sprite 3,3
obviouly the second code snippet doesnt work, i though it would have. ive tried and tested lots of combination of code to no avial. can i pick someones brains on this matter? would be grateful!
thanks