Anyone who can help me with finding out how to randomize sound effects when interacting with an object? I want to make a piano interactable in my game, but I'm unsure on how to randomize the sounds.
If anyone could help that would be great, thank you in advance!
You could use control variables to set a variable to a random value, then have a conditional branch for each possible value which plays a different sound.
Were you able to make it work now?
Like mentioned above, that only works if your sound effects are named like: 'Key1', 'Key2',' Key3' etc. That script is generating a number and adding it to the word 'Key' and then trying to play that SE.
No problem.
I can randimize the pitch for you too, if you like. Then it sounds even more random. 1 file can already sound way different if you just change the pitch.
So if it is to have locks sound different each time, you can use different pitches instead, and just use the same sound over and over, of have multiple files AND multiple pitches, then you'll end up with a huge number of different sounds.
Ill do that later today. At the moment Im streaming.