1

Good Morning,

First of all, I want to say how much I enjoy the package. For a free asset it has been a very nice drag and drop for play testing.

I am trying to change the foot step sounds.

However, when I add a custom sound that works on every other character, it spams the sound. Checking debug logs, it seems that the Play Sound method is being activated more than once for every footstep. I noticed that your sound files have a brief period of silence before the sound is played.

Is that the only solution you have?

A few fixes I have tried are changing the script to only play a sound if a sound is not already playing. This worked great for walking, but sprinting didn’t work. Here is the code I used in the rightFoot method of FootActions.cs

“` if (!Rfoot.isPlaying)
{
Debug.Log(“Play Sound”);
int ClipIndex = Random.Range(0, LayersSaunds[Index].audio.Count – 1);
Rfoot.clip = LayersSaunds[Index].audio[ClipIndex];
Rfoot.Play();
}“`

My other idea would be to instantiate a new sound object every time the audio is played. That is what I do for multiplayer games but since the method is being called hundreds of times that wouldn’t fix it.

I imagine it has something to do with the IK rig.

Any help would be appreciated

-Nate

P.S There are a lot of spelling errors in the code. Although I do not mind it because I still understand what you are trying to say, I could see this being a turnoff for future customers.

go systems Unselected an answer September 20, 2023