I'm trying to play a random sound effect based on a variable.
My SE files have these names: sound1.ogg, sound2.ogg, ... sound9.ogg
Tried this:
Set the value of variable #24 to a random value between 1 and 9 via event.
Script:
Of course it didn't work, and it was the best idea I've ever had. I guess it's something simple, but I'm a complete noob in js. Can anyone help me with the code?
My SE files have these names: sound1.ogg, sound2.ogg, ... sound9.ogg
Tried this:
Set the value of variable #24 to a random value between 1 and 9 via event.
Script:
Of course it didn't work, and it was the best idea I've ever had. I guess it's something simple, but I'm a complete noob in js. Can anyone help me with the code?