I can't get the sound to play when I hit a new platform.
Here's the collision in the main loop:
for(sp_num = 4; sp_num < 10; sp_num ++)
{
if(dbSpriteY(sp_num) > ycord)
{
dbPlaySound(1);
while(dbSpriteCollision(3, sp_num)!= 0)
{
ycord -= 2;
if(dir == 2) dbSprite(3, xcord, ycord,3);
if(dir == 1) dbSprite(3, xcord, ycord, 5);
//enable jumping!
jump = 1;
if(sp_hold != sp_num)
{
//This will hold the number of the sprite
//the player just collided with
//so it wont play the sound more then once
//while standing on the platform
sp_hold = sp_num;
//The stupid playsound that doesn't work
dbPlaySound(1);
}
}
I've made sure by checking with a breakpoint that it only enters the if with dbPlaySound once per platform.
if(sp_hold != sp_num)
{
sp_hold = sp_num;
dbPlaySound(1);
}
still there are no sound.
And yes; I have the speaker on and I loaded the sound with dbLoadSound("land.wav", 1);