ShaunJS

Chance()

Jul 30th, 2017
7,566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// @description Chance(percent)
  2. /// @param percent
  3.  
  4. // Returns true or false depending on RNG
  5. // ex:
  6. //      Chance(0.7);    -> Returns true 70% of the time
  7.  
  8. return argument0 > random(1);
Advertisement
Add Comment
Please, Sign In to add comment