roll the dice

Jan 21, 2018

I want learners to roll the dice and have a new text box appear with each roll.  How do I create that?

6 Replies
Richard Watson


If you are working in SL 360...

Use a combination of a random variable and layers. If you are working in earlier versions of Storyline, you'll need to use javascript.

In Storyline 360:

1. Create a random variable

(See here):

2. Create a layer for each roll value (e.g., 1-6)

Based on the variable value, take them to the appropriate layer where the applicable text message can be shown.

See attached for an example created in SL360.

Richard Watson

In order to create the same in Storyline 2, you'll need to use some Javascript.

Although I wrote this blog article for SL360 (before Articulate added the random element into the product) it will work in Storyline 2.  Keeping in mind that when using Javascript, you'll need to publish to make it work. A simple preview won't suffice.

There are also tons of discussions on this board about using javascript with Storyline. I'm not an expert, by any means, with Javascript but there are many others here who are!  :)



This discussion is closed. You can start a new discussion or contact Articulate Support.