Rolling Dice demo and Random Question Draw workaround
Successfully solved a couple of problems today so I'm sharing my methodology in case it helps someone else.
I was creating a game and I wanted to simulate the rolling of dice (well, I went with a single die in the end). I wanted the die to roll randomly and add to a score. (The score changed the position of the game piece on the board, which I controlled with states).
You can see that each roll of the die takes you to a layer which change the appearance of the die.
I then created lines of code that said:
'Jump to Question Draw 1.2 if RandDraw is equal to 2'
'Jump to Question Draw 1.3 if RandDraw is equal to 3'
etc etc. You could put as many draws as you want just as long as every random number is associated with a draw. This needs to be repeated on every layer. (get it right on one layer then copy the layers is the easiest thing).
This results in the same button sending the user to a different draw from the same question bank randomly. There is a possibility they will end up with the same question more than once but the more draws you put in, the less likely that is. In my particular application I didn't mind if they occasionally got a repeat question.
Well, hope this helps someone.