Issue:
I have 8 different footstep sounds, that I want to be played random.
Currently, this is my setup:
I created a random variable and for every possible outcome I have a specific sound effect.
It works, but its a lot of lines - and because the whole event will be much longer in the end, I want to shorten this part as much as I can.
What I want:
a line of JS-Code that basically says
And x shall be the variable "varRandomFST" from above
But because of my very limited JS-knowledge I have no Idea how to do it ^^"
I have 8 different footstep sounds, that I want to be played random.
Currently, this is my setup:
I created a random variable and for every possible outcome I have a specific sound effect.
It works, but its a lot of lines - and because the whole event will be much longer in the end, I want to shorten this part as much as I can.
What I want:
a line of JS-Code that basically says
AudioManager.playSe({name: 'fst_cnc_x',})And x shall be the variable "varRandomFST" from above
But because of my very limited JS-knowledge I have no Idea how to do it ^^"