Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Xander Davis on July 04, 2017, 03:32:46 PM
-
Hi, I'm using Play Random Sound. It works-- except it doesn't.
It chooses a random sound from the list (164, all with Weight set to 1), but on every single play through, it plays them in the exact same order... (they're voice over barks)
Advice?
-
PS: Incidentally, Weight is the only thing completely absent from the Play Random Sound documentation.
???
Is this a bug? Should be super simple...
-
Hi,
I cant test right now, but can you try 'Play Random Audio' instead (test with 4 sounds or so)
You can find the action on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
-
hi, create an object array, insert all the sounds you need in the array, use the array get random action and in the next state play audio and then loop back and forh between the states, that's the best way to do this
-
Hi,
@Carmichael Actually i have to disagree with you.
"Play Random Audio" is using 'List' which works faster than 'Array'
List<T> should generally be preferred over Array
faster for value types as it avoids boxing.
strongly typed elements
But then again you will only start to notice this when you have like 100.000 Lists/Arrays
So it both ways would be fine :)