I have this script for a bbcode effect that types out each character in a richlabel and I wanted to modify it so that a sound would play each time a character is typed. I don’t really understand richlabel custom effect code that well (I copied this script from reddit) and have been looking over the docs for a couple hours but still don’t really get it. Here’s the code:
The audio in this code has many instances all playing on top of another at the beginning of the effect then stops immediately after. Also not sure if this could also be adding to the problem but the method I’m using to play the audio is this:
I’m not sure where the code is from, but from what I can tell, on line 13, the code is expecting a path to the sound you want to have played.
var sfx: String = char_fx.env.get("sfx", "path/goes/here")
Replace “path/goes/here” with the path to your sound effect. You can do this by right clicking on the sound you want to have played inside your project, and clicking on “Copy Path” then pasting it in between those quotes. See if that does it.