Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

dice scrip help, p....please

Misery Moonlight
h...hello
Join date: 22 Sep 2005
Posts: 5
03-21-2007 18:33
i...i needs all your help, d...dose anyone knows i..if there is a simple script t...to use for rolling dice? i...i is looking for a script t..that will randomly choose s...sides for a..a 6 sided d..dice. a...any help will be much appreciated. t...thank you ^.^
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
03-21-2007 18:56
Use the function: llFrand()
CODE

integer SIDES = 6;

default {
touch_start(integer num_detected) {
integer roll = (integer)(llFrand(SIDES) + 1);
llSay(0, "You rolled a: " + (string)roll);
}
}