SlashCo Wiki

SlashCo.GetWeightedRandom

 number SlashCo.GetWeightedRandom( table table )

Description

Returns a random number within the total weight of a weighted table.

Arguments

1table table

Weighted table containing numeric weights

Returns

1number random

Random weighted value between 0 and the total weight