Blog Post
RossDewstow-5e0
Community Member
For those who have not upgraded to Storyline 360 and are still using Storyline 3, I used this JaveScript to generate a random number from 1 to 6 to select a number on a dice.
var randomnumber = Math.floor((Math.random()*6)+1)
var player = GetPlayer();
player.SetVar("randnum",randomnumber);
I then had 6 states on an image of a dice to represent each number from 1 to 6 and displayed the dice with that numbered state.
This was for a game of snakes and ladders, using thermometers and syringes in my hospital setting.
Ross
var randomnumber = Math.floor((Math.random()*6)+1)
var player = GetPlayer();
player.SetVar("randnum",randomnumber);
I then had 6 states on an image of a dice to represent each number from 1 to 6 and displayed the dice with that numbered state.
This was for a game of snakes and ladders, using thermometers and syringes in my hospital setting.
Ross
KeithShull
7 years agoCommunity Member
@Ross: Would love to see it in action. Canyou share?