Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Dice

17 years ago

Can you make Dice?

Like a 50/50 chances of either one of two events happening??

Dice

17 years ago

you can set a variable to 1d2 and then have two links, one visible if the variable = 1 and a different link visible if variable = 2.

this seems to work in a game i'm making, anyway.

Dice

17 years ago
Yeah, that's how you make dice: (whatever number)d(whatever number).

Dice

17 years ago
riiiiiight i have no idea how to do that! can somebody provide a step by step tutorial?

Dice

17 years ago
anyone?

Dice

17 years ago
Yes I can Dont really want to though.  Its advanced editor.  There's probably a thousand posts and an article about it.

Dice

17 years ago
A link maybe? I have had a look! but can't find anything!

Dice

17 years ago
Go to Help & Info and choose solostrike's "Working with Variables" article. 

Dice

17 years ago
Java stole my sign avatar idea! rofl.

Dice

17 years ago

enable scripting.

On the page that you want the dice roll to happen, make a link.

Clikc the link script icon.

Enter:

%DICEVARIABLE := 1D2

IF %DICEVARIABLE = 1 THEN
$DEST := @P2
ELSE
$DEST := @P3

Basically, it rolls a dice and stores it into a variable. It then evaluates whether it was 1 or 2 and takes the course of action. Substiute @P2 with @P4, @P5 or whatever page you want.

Dice

17 years ago
cool thanx

Dice

17 years ago
No problem, if you need more help, check out the scripting articles in the help section.

Dice

17 years ago
Good on ya Solo

Dice

17 years ago
Or if you don't wish to use scripting, you can look up and article called "Defining the Random Variable".

Also, just in case Solo didn't make it clear, and I know it seems obvious but just in case, the DICEVARIABLE can be anything, your strength or whatever. You can change it for whatever variable, like how much money you win, or how much your health goes down when you get attacked by a major headache caused by Simple Plan *shudders*.

Anyhow, it's a useful feature.