Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: IIKII on December 06, 2016, 09:16:19 AM
-
Hi, the volume with play random sound is too low. I try setting audio volume as well as add audio source but it's not working.
I am aware of play audio advance action but I want to use the random sound action.
How to fix the volume issue?
-
Hi,
To do random sound i usually do this with arrays and audio play
So i have my audio into an array (sounds) and i use 'array get random indexed'
(this is a custom action i made, because the standard 'array get random' is not storing the index number) and store the sound and the index nr.
Then i have another array (Volume) with a float value for the volume for each sound.
and i get the volume with 'array get' and use the index number.
Then i use audio play with the sound and volume variables.
If you don't need separate volumes you can just use one array (sounds)
-
The Custom Action you can find on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) btw :)