Dear all.
I'm completely new to DBp and am trying various noob stuff.
One anomoly I've come up against is a delay when I first try to play a sound.
This is my code...
load image "bat.bmp",1
load image "ball.bmp",2
load sound "boing.wav",1
batx=320
ballx=0
bally=0
ballxx=1
ballyy=1
repeat
cls rgb(0,0,0)
sprite 1,batx,450,1
sprite 2,ballx,bally,2
inc ballx,ballxx
inc bally,ballyy
if rightkey() then inc batx,1
if leftkey() then dec batx,1
if batx<0 then batx=0
if batx>560 then batx=560
if ballx>620 then ballxx=-1
if ballx<0 then ballxx=1
if bally>460 then ballyy=-1
if bally<0 then ballyy=1
if sprite hit(1,2)
ballyy=-1
play sound 1
endif
until escapekey()=1
When my ball first hits the bat 'sprite hit (1,2)' there is a delay before it plays the boing.wav sound. After this, it's instantaneous.
Anyone know why? I've done a search, but it didn't come up with anything.
Thank you.
UberNoob