Disliked{quote} In a string function define five sounds in array using double array integer and string Math.rendum on the integer value to get a random string value Return this value Now on a new bar or any bar where this function is required use play sound ( function) Unfortunately I see a coding opportunity in every funny videoIgnored
Attached File(s)
If you wanted to use a string array, you would need to do it like this:
Inserted Code
string Sounds[5] = { "a.wav", "b.wav", "c.wav", "d.wav", "e.wav" }; We can only pass constants into arrays, so there is no way to pass the inputs into such array.
(I mean, there may be a way, but it requires a trick, and we will do that only if very necessary!)
And you need your own sound files! So you need to input the names of the sound files which you installed in the Sounds folder!
Or like this:
Attached File(s)
But I don't like this way, unless it's the only viable way, because of the small input area on the screen.
.ex4/.ex5 files can't be fixed or modified / I'm not a coder!
1