Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var total = 0
- for row in propRow.rows:
- total += row.weight
- var select = rng.randf()*total
- for row in propRow.rows:
- total -= row.weight
- if total < select:
- return row
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement