Forum Discussion
Random Number Generator
Please help! Is there a way to set up a bank of random numbers inside my Storyline? I need to randomly generate 100 unique numbers. After the learner completes a course, they would click on "generate a secret code" and it would access the bank of random numbers and present them with one. The numbers have to include numbers and a cute phrase such as: 8271BunniesRcute and dogsRgreat3719. I've read through a ton of threads but I can't find anything with a number bank.
We don't have an LMS so we're going to set this up so that the learner can give us their "secret code" then we can record them as having completed the module.
I'm also open to any other ideas for tracking course completion without an LMS. We want it to be something fun. :)
Thanks!
You can generate a random number using variables. That's easy enough. You'd probably have to create a random series of text that is connected to a random number. Of course, the code could be anything since it's not really connected to an account.
Here's a training video David did on using number variables.
If you did use a random generator, I'd not use 100 characters as that requires a lot more work.
Here's a post I did a while back that may interest you.
https://blogs.articulate.com/rapid-elearning/simple-way-track-courses-without-lms/
- DarleneDalgl618Community Member
Thanks Tom! That's very helpful. I'll check these out.
Thanks, Ron. :)
I guess we were both building tutorials.
- RonPricePartner
Our builds took different approaches - so the more the merrier :)
- RonPricePartner
I would think that this would be pretty easy with the Random Number Variable Trigger and Text variables.
Have you explored these options?
- DarleneDalgl618Community Member
Thanks Ron! Yes. I've thought about using variables but I'm not sure how to.
Hi Darlene!
Great question! I have mostly only seen solutions to generate a random number using Javascript as there is no built-in functionality for Storyline, but this one does use a question bank so it might work for you as well.
Also, I found this resource that explains how to assign a random value to a number variable using triggers.
Hope this helps!
- DarleneDalgl618Community Member
Thanks Steven! That's great! I'll check out these resources.
- RonPricePartner
Here is an example using 10 different codes - https://360.articulate.com/review/content/7d7d0ac2-947f-4398-b84d-9169bf3aa796/review
- DarleneDalgl618Community Member
Awesome! Thanks so much Ron!
Here's a quick tutorial to show a way to do this. It's pretty quick. https://360.articulate.com/review/content/2aa86b42-4261-4974-b233-4a171cc1af34/review
- DarleneDalgl618Community Member
Thanks again, Tom! Appreciate it!
It's kind of funny because Ron and I were just discussing this last week when someone starts to post and then in the mean time others have already posted.
Hope the resources help.
- DarleneDalgl618Community Member
Not surprising at all. This community is the best! Yes. They were very helpful! I'm playing with the SL file that Ron sent. :)
- RonPricePartner
East Coast time difference, put me slightly ahead
- BoonHengGohCommunity Member
Hi, I am new to Storyline and just downloaded the 30 days trial. I was trying to add a Random number to my project. I see that in some of the examples above, when one creates a variable, it is possible to set it to some Random Number between X and Y. However, in my version of Storyline, I can only set a Variable to a value or a variable. There is no Random Number option. May I ask if this is because my version is the trial version? or am I missing some steps or setup for this to work?
- NedimCommunity Member
You would normally create another custom number variable for which you are setting the random number value. In the screenshot, I have created a number variable named "myNum," which I am setting to a random value between 1 and 10. Keep in mind that "Random" is a built-in selector and it only works with number variables. The random number between will automatically appear after Random is selected. This should work with the trial version as well.