Add random_choice helper function to effect template

This commit is contained in:
2026-01-17 21:45:07 +00:00
parent 9adccd279b
commit d43f38db88

View File

@@ -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