Help please, sound bug! :'(
Posted: 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:
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
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;