Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

random number generator?

Nevesenic Janus
Registered User
Join date: 28 Jun 2007
Posts: 4
07-09-2007 03:42
i am looking for coding for different random number generators.

would you use a different form for 'coin flip' type only two choices then you would for say multi sided dice?
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
07-09-2007 05:59
From: Nevesenic Janus
'coin flip' type
(integer)llFrand( 2.0 ); // 0 == heads, 1 == tails

From: someone
multi sided dice?
(integer)llFrand( 6.0 ) + 1; // 6 sides, values 1 - 6