diff --git a/effect_template.lua b/effect_template.lua index db4a131..8669169 100644 --- a/effect_template.lua +++ b/effect_template.lua @@ -35,3 +35,14 @@ function OnTick() end -- Add custom helper functions below. + +function random_choice(p1) + if type(p1) ~= "table" or #p1 == 0 then + return nil + end + local choice = p1[math.random(#p1)] + return choice +end + + +