|
Post by eyesgood on Oct 16, 2020 18:44:32 GMT
I am using a Random Mechanim State Sound script to play a sound during a swimming animation state. I am using the Enter Sound Group option with Play Enter Sound and selecting a Sound Group which contains 3 variations of a swimming sound. I am leaving the Enter Variation Name null so it picks a random variation. I want to be able to have the controller randomly play a different sound from the group every time the animation cycles, not just when the animation starts. The animation and the sound are both one second in length. When the animation cycles, the sound does not reset and maintains the currently selected variation until the animation stops - i.e. I stop swimming. Then, it randomly picks a different variation as it should.
Is there a way to have it randomly change the variation at the beginning of the next animation loop, rather than only changing when the animation starts again?
Note, I tried turning off the Loop on the sound clip and turning on Retrigger When State Loops on the State script. However, when I do that, the sound only plays initially and never plays again until animation stops and starts over.
Thank you.
|
|
|
Post by DarkTonic Dev on Oct 16, 2020 23:01:57 GMT
Negative, you would need to write your own behavior for that.
|
|