Music Overlay Problems

Blitz3D Forums/Blitz3D Beginners Area/Music Overlay Problems

it looks like because your storing 'whatwaspicked' then the condition is to see if 'whatwaspicked' equals raegetton, and if you store it, it always equals raegetton, thus playing the sound every loop..

try this:

raesound=LoadSound("raegetton practice.wav")

while not keydown(1)

If MouseHit(1)
	whatwaspicked=CameraPick(camera,MouseX(),MouseY())
EndIf 


If whatwaspicked=raegetton Then
	raechan=PlaySound(raesound)
                   whatwaspicked=0
EndIf