ElizabethKra817
2 years agoCommunity Member
Random number generator avoiding duplicates. - SL3
I realize SL360 may be easier to complete this project. Alas, I cannot upgrade currently. I do, however, need help with the random number generator I am using to create a set of flash cards. One slide with 50 layers.
I created a variable randum and used the following js to generate a random number and linked it to specific slides with triggers. Altho tedious, that was easy.
var randomnumber = Math.floor((Math.random()*50)+1);
var player = GetPlayer();
player.SetVar("randnum",randomnumber);
(2) Questions:
1. How do I avoid duplicate numbers appearing regularly when I run the app?
2. How do I end the app when all cards have been used.
Any suggestion would be helpful. I am a js newbie.