Jump to content

Dice script


Wolfe Deckard
 Share

You are about to reply to a thread that has been inactive for 1961 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

11 hours ago, Rolig Loon said:

integer RndX =  4  - (integer) llFrand(9.0);

So ..... 

if (integer)llFrand(9.0) == 0, RndX = 4

if (integer)llFrand(9.0) == 1, RndX = 3

if (integer)llFrand(9.0) == 2, RndX = 2

if (integer)llFrand(9.0) == 3, RndX = 1

if (integer)llFrand(9.0) == 4, RndX = 0

if (integer)llFrand(9.0) == 5, RndX = -1

if (integer)llFrand(9.0) == 6, RndX = -2

if (integer)llFrand(9.0) == 7, RndX = -3

if (integer)llFrand(9.0) == 8, RndX = -4

And yes, it doesn't make any difference which way you do the math.  Innula's way and mine are the same.  I was just trying to show the OP an alternate way of writing the same thing.

Edited by Rolig Loon
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1961 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...