Help please, sound bug! :'(

Non-platform specific questions.

Help please, sound bug! :'(

Postby Hblade » Sun May 15, 2011 8:40 pm

I'm trying my hardest to find a way around the jump sound effect bug... What happens is, I guess it happens whil ewalking but it'll play 2 sounds when you jump sometimes >.> I tried using stopSound(2) to cancel out the channel before it plays it, but that still remains glitchy as it makes a lag-sound Oo the code for jumping is:
Code: Select all
if (A==1 || KBD_A==1) {
    if (temp[0]==0) {
        temp[0]=1;
        yvelocity=-16;
        PlaySound2("data/smw_jump.wav", 1.000000, 1, 0.000000);
        if (animindex==1) {
            ChangeAnimation("Event Actor", "jumprightsmall", FORWARD);
                          }
        if (animindex==3) {
            ChangeAnimation("Event Actor", "jumpleftsmall", FORWARD);
                          }
                    }
                      }

Explanation of A and KBD_A and other vars:
A, represents Xbox 360 style controls (no bugs in the controls btw), and KBD_A represents the jump key, which is K
the animindex makes so it doesn't loop change the animation (No animation bugs either btw)
temp[0] basically is jump


When I jump it makes it 1 to uh... not loop the jump, however, sometimes the yvelocity fails to activate I noticed, yet it plays the sound O.o... why is this?



Collision with top of land (repeat yes) code:
Code: Select all
temp[0]=0;
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Help please, sound bug! :'(

Postby jimmynewguy » Sun May 15, 2011 10:19 pm

If you're using physical response (I found a while ago) your player animation might have a low point where he goes one pixel downwards/upwards then other animations and he'll get like sorta glitched up in the ground. It happened so my player wouldn't jump though, not a sound error. Try making sure all of your player sprites line up exactly. Other than that I see no reason for a bug :(
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: Help please, sound bug! :'(

Postby Hblade » Sun May 15, 2011 10:57 pm

Thanks so much! :D i'll try that
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest