|
Post by micro on Apr 29, 2020 14:27:56 GMT
Hi all,
Is there a way to change the audio clip of the sound group through script?
I have alot of audio clips to be played in a same exact manner (Linkgroup start-stop, loop) but I do not want to write a wrong codes to accommodate all these.
If it is doable it will greatly reduce the codes.
Thanks!
|
|
|
Post by DarkTonic Dev on Apr 29, 2020 15:39:09 GMT
Not a good idea.
Why would you not pre-populate all the audio clips? You can play whatever Variation you like in any Sound Group with or without code.
|
|
|
Post by micro on Apr 30, 2020 3:43:52 GMT
Because i have like a 100 audio clips needed to be played depends on the int values (lets say 1-100). The changing of the clips(chained with linkgroup) will be triggered with the change of int value in real time. By right I should write a long list of switch case statement from 1-100 to achieve this which is pretty lengthy.
I looked in the variation option in the sound group and couldn't figure out the way to achieve the desired effect with a simplified way. Or is there a way to access the variation with order number after I put all my audio clips in? With that I can shortened the code alot just by calling the variation with order number.
|
|
|
Post by DarkTonic Dev on Apr 30, 2020 7:14:53 GMT
You don't specify a sequence number, you specify the Variation name to play. When you create the Variations, the name will default to the name of the Audio clip, but you could go rename them to numbers if that makes things easier with a random number script.
|
|
|
Post by micro on Apr 30, 2020 13:12:22 GMT
I think I understand something now. I will give it a try with the string + number method. Thanks for your response!
|
|
|
Post by DarkTonic Dev on Apr 30, 2020 15:09:13 GMT
No problem.
|
|