Weakaura - Play a random soundkit from a list

So i got a weakaura that I want to play a random ingame sound out of about 6 different ones. I tried just adding them with commas in the “play sound by kitid” or what its called but it didnt play any at all when i did that. Im guessing I need to use the “custom code” thing to somehow make it work?

Im really sorry if my explanation isnt very good but im very new to Weakaura and hope someone can help :slight_smile:

local skids = {id1, id2, id3}
PlaySoundKitID(skids[random(#skids)], "master", true)

Alternate

PlaySoundKitID(GetRandomArgument(id1,id2,id3,id4), "master", true)

Thank you so much for replying! :slight_smile: May I ask where to add this code? Is it under “action” or “conditions”?

I tried adding both to the Custom function under action and also: Condition > if all of trigger 2 true/ trigger 2 true > “then” Run custom code. Neither sadly worked

Should be action > on show > custom

Got it to work, ty so much!! :slight_smile: <3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.