- Joined
- Jan 1, 2018
- Messages
- 8
- Reaction score
- 1
- First Language
- Português
- Primarily Uses
- RMMV
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:
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?AudioManager.playSe({name: 'sound'$gameVariables.value(24), pan: 0, pitch: 100, volume: 100});

