Avatar audio trigger button only plays sound once

Hey all.

I’m trying to get my Avatar to play a sound through the use of a button. It works, but only one time. After that if I go to use the button again it wont play the sound. What gives?

I’m using a Int passing 1 to my parameter (1 is the condition to trigger, !=1 is the condition to return to idle) no exit time on either transitions.

My guess is that either the transition away from the sound clip “animation” back to idle never happens, or somehow my Int is not returning back to 0 after being set to 1.

You’ll need to have the idle state turn off the audio source.

How would I do that?

Same way you made the toggle on but with the sound clip being off instead

the sound clip is basically treated as an animation right?.. so should i make another “animation” where the sound clip isnt playing and link that motion to the “idle” state?

Yes, exactly that!

I tried that out and it still doesn’t work… My theory is that pressing the button passes down Int value of 1, but the Int never returns to 0 after releasing the toggle. I’m at my wits end with this. I can’t believe it’s this incredibly complex just to get a sound to toggle on a VRC avatar… :melting_face:

Can you show a picture of what your toggle on & off animations looks like?

Just a side question. Are you in the VRC discord? If not, I would suggest joining it so I can give quicker responses and you could also get help from other people as well instead of waiting multiple hours just for an answer

It’s funny you should say that as I joined it yesterday on a whim and I managed to get my solution finally!

Basically in order to fix this issue, I needed to have my “idle” load an animation. I needed a specific type of animation though : Sound object (unhidden) —> sound object (hidden)
I applied that new animation to the “idle” event and now i can play my sound as many times as I want!