Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RandInt ?!
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#19
RE: RandInt ?!

If you want a 50% chance of something, this should do:

PHP Code: (Select All)
if(RandInt(0100) < 50) {
    
//do something


The "50" can be changed to any percentage you want. If you need decimal percentages, you must use RandFloat instead.

07-09-2015, 12:54 PM
Find


Messages In This Thread
RandInt ?! - by Amnesiaplayer - 07-05-2015, 08:01 PM
RE: MudBox Export Issue - by Traggey - 07-05-2015, 09:35 PM
RE: MudBox Export Issue - by Amnesiaplayer - 07-05-2015, 09:46 PM
RE: MudBox Export Issue - by Traggey - 07-05-2015, 10:00 PM
RE: MudBox Export Issue - by Amnesiaplayer - 07-05-2015, 10:04 PM
RE: MudBox Export Issue - by Traggey - 07-05-2015, 10:06 PM
RE: MudBox Export Issue - by Amnesiaplayer - 07-05-2015, 10:15 PM
RE: MudBox Export Issue - by Daemian - 07-06-2015, 01:38 PM
RE: MudBox Export Issue - by Amnesiaplayer - 07-06-2015, 01:59 PM
RE: RandInt ?! - by Daemian - 07-07-2015, 08:29 PM
RE: RandInt ?! - by Amnesiaplayer - 07-08-2015, 09:14 PM
RE: RandInt ?! - by Rahmerh - 07-08-2015, 09:16 PM
RE: RandInt ?! - by DnALANGE - 07-08-2015, 09:17 PM
RE: RandInt ?! - by Amnesiaplayer - 07-08-2015, 09:42 PM
RE: RandInt ?! - by Romulator - 07-08-2015, 10:25 PM
RE: RandInt ?! - by Amnesiaplayer - 07-08-2015, 10:33 PM
RE: RandInt ?! - by Romulator - 07-08-2015, 10:39 PM
RE: RandInt ?! - by Amnesiaplayer - 07-08-2015, 10:44 PM
RE: RandInt ?! - by Mudbill - 07-09-2015, 12:54 PM



Users browsing this thread: 2 Guest(s)