Audio Trigger reset issue
Hi Im working on a lens that when you tap an object it triggers audio (and a bunch of other thing such as particles and images), which I have managed to get working. The issue is that there is a button which I have created that resets the trigger so that the lens can be used over again. But I cant seem to get the audio to stop and reset.
Ive tried adding behavior scripts to it. But this did not work. Also added scripts to the the audio that are meant to disable it but these do not work either. Is this a bug or am I doing something wrong?
Please help.
Hi Michael!
Behavior Script unfortunately doesn't have a "Stop Audio" response type, as you noted. If you really want to use Behavior Script, you can workaround this limitation by triggering the "Play" response type, but with a volume of 0. In this case, however, you would need to pass in an AudioComponent, instead of an Audio Track.
If this setup sounds a bit too clunky for you, I recommend trying out a Script like the one below. It basically toggles a playback of an AudioComponent every time the user taps the screen:
Let me know if it works for you!
Best,
Peter
Hi Peter,
Thank you for your feedback on this. I will definitely try the script that you have suggested.
I am also using the same trigger and tried to rest it but faced this issue in my account you canclick here to read the details.