Jump to content

Dice roller


Wolfe Deckard
 Share

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

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

Recommended Posts

Hey there.

 

Im looking for a script to create a dice hud for an rp sim.  What I am needing the hud to do is roll 1 to 15 ten sided dice and list the results of each roll as well as beng able to set a difficulty from 1 to 10 that the results of the dice are compared aganst and the number of successes are listed. Any help would be appreciated.

 

Thanks

Wolfe

Link to comment
Share on other sites

Sounds like you will need:

 

variables: numberOFdice, Difficulty, numberOFsucesses

a dialog or textbox to determine how many dice to use

a textbox or dialog with 10 buttons to set the difficulty

 a loop with llFrand(9) + 1

a say to list each result in the loop

an IF statement to compare the rolls to the difficulty variable

 

 

 if you need a script made FOR you, you need the wanted or inworld employment forums?

 

Link to comment
Share on other sites

If you're scripting dice, take a look at the script in the dice that are in your Library >>> Objects folder in inventory.  They roll nicely, and you shouldn't have trouble using that approach to roll 10-sided dice instead of 6-sided ones.  Just send the trigger signal as a chat message from your HUD instead of triggering them by touch.  Detecting which face is UP will take a bit of math with rotations, so that's the hardest part.  The rest of it is just statistics.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2520 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...