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 ?!
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#9
RE: MudBox Export Issue

(07-06-2015, 01:38 PM)Daemian Wrote:
PHP Code: (Select All)
int RandInt(int alMinint alMax); 
It generates a random number between alMin and alMax

Quote:int n = RandInt(0,10);
n gets a number between 0 and 10.

You can use it for many things, like to obtain a chance to do something.

Quote:int n = RandInt(0,10);
if (n==0) { GameOver = false; }

Oh thanks,
but if I want like, you spawn in your house and there are 3 pieces, parts.
and there are 2 locations of all the 3 parts, can I make this happen with randint?!
Like part 1, 50% at loc1, 50% at loc2, part 2 50%loc3, 50%loc4, and part 3 50% loc5, and 50%loc6 etc...
Because in the map where I need that, there are some things you have to do, if you die, you have to start over, so it would make it better if the chances are random, or otherwise it would be too easy for them to beat the parts they already did..
07-06-2015, 01:59 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: 1 Guest(s)