- Home /
Loop audio with Bolt
Hi,
I'd like to loop on a sound. As you can see below, I call a custom event with an argument that is used as an index of a list of clips, so I can choose which clip to play.
It works but does not loop (one shot) even if the option "Loop" is selected in the inspector. I tried the unit Play, but it does not take the clip as an argument I tried the unit PlayClipAtPoint which does take the clip as an argument but does not loop. I cannot find a unit that works for me.
What I am trying to achieve is when the player enters a trigger, the custom event is called with a specific argument, so the corresponding sound is played and keeps playing until the player exits the trigger, so the sound needs to loop.
Could someone help please?
Thanks!
Answer by Marou1 · Jan 02 at 03:20 PM
If someone has a similar question, you can use the unit AudioSource Clip (set), then use the unit AudioSource Play which can loop.