How do I put a random number generator inside my Storyline? I am trying to generate "randomly" five separate numbers between 1 - 64. Each number corresponds to a picture. After five numbers have been generated, the student will click on the numbers generated to reveal a picture (but that is separate from this question). Right now I am focusing on how to have the student click on the generator and come up with 3 to 5 numbers.
All of your are the most awesome group of people EVER! @Cheng Li--Thank you so much for putting it all together on a Storyline slide. That is just above and beyond the call of duty, and it helps me immensely. @Ashley somehow you might want to put Cheng Li's solution in the community with additional instructions on how to change the number spread. Thank you everyone so much
All of your are the most awesome group of people EVER! @Cheng Li--Thank you so much for putting it all together on a Storyline slide. That is just above and beyond the call of duty, and it helps me immensely. @Ashley somehow you might want to put Cheng Li's solution in the community with additional instructions on how to change the number spread. Thank you everyone so much
You are welcome. I incorporated a solution for your latter question: displaying picture after the fifth number is generated, in case you wonder. See attached.
I have mostly only seen set ups to generate a random number using Javascript as there is not a built in functionality for Storyline, but this one does use a question bank so perhaps that would work for you.
I've tried the generator to create a sweepstake for the GBBO. My js coding and/or variables aren't working correctly and I'm wondering if someone could take a look to see if they can spot my errors xxx
Wooohoo!! Having not paid close enough attention to the original instructions,
a: I somehow deleted the javascript coding
b: tried to include the jump to direction in the coding (?!!?!)
Fortunately, with the guidance based on this particular forum and from eLearning Heroes across the globe, I've found a way to make my Great British Bake Off sweepstake work :)
Now...to pretty it up! The show starts tonight so it's cutting it close!
Thanks folks, I've attached the finished story file, where the interactions are now working correctly :)
I have used the exact code from these examples, and have tested in a separate file... but when I add it to my actual course, the variable does not change. What could be going wrong?
Do you have a sample file we can look at to see what you've created so far? Seeing the file is helpful, so we can offer specific advice for adjusting the variable in your course.
21 Replies
HI Robin you can generate a random number using java script,
May be this could help you
http://thatelearningcompany.wordpress.com/2012/11/09/usingjavascriptinarticulatestoryline/
Hi Robin,
There is also a thread here to use a question bank to randomize a number - and the majority of other solutions in the community will use Javascript as Rehan mentioned.
Hi Robin,
Attached is an example for your case.
Hope it helped.
All of your are the most awesome group of people EVER! @Cheng Li--Thank you so much for putting it all together on a Storyline slide. That is just above and beyond the call of duty, and it helps me immensely. @Ashley somehow you might want to put Cheng Li's solution in the community with additional instructions on how to change the number spread. Thank you everyone so much
You are welcome. I incorporated a solution for your latter question: displaying picture after the fifth number is generated, in case you wonder. See attached.
Cheng
good job Cheng.
Glad this thread was able to assist you as well Vimal :)
Hi,
Is there a way of generating a random number without using Java?
Java is fine for most applications but we are thinking of rolling out to iPad.
Thanks
Jake
Hi Jake,
I have mostly only seen set ups to generate a random number using Javascript as there is not a built in functionality for Storyline, but this one does use a question bank so perhaps that would work for you.
Thanks Ashley,
That looks like it would do what we want.
Thanks!
Hey folks
I've tried the generator to create a sweepstake for the GBBO. My js coding and/or variables aren't working correctly and I'm wondering if someone could take a look to see if they can spot my errors xxx
Hi Jo
can you upload the story file easier for someone to help you if they can work with your setup - you uploaded the published output.
Let me have another go... is it the story.html file I should send?
No Jo the storyline source file the one you open up and edit in Storyline - has a file extension .story
I'm with you ! Let me send it now :) xxx
Hi Jo!
JavaScript is out of my support wheelhouse, so hopefully someone will be able to chime in and assist you here :)
Wooohoo!! Having not paid close enough attention to the original instructions,
a: I somehow deleted the javascript coding
b: tried to include the jump to direction in the coding (?!!?!)
Fortunately, with the guidance based on this particular forum and from eLearning Heroes across the globe, I've found a way to make my Great British Bake Off sweepstake work :)
Now...to pretty it up! The show starts tonight so it's cutting it close!
Thanks folks, I've attached the finished story file, where the interactions are now working correctly :)
jo xxx
Thanks for popping back in to share Jo :) Glad you were able to get that sorted.
Hi everyone,
I have used the exact code from these examples, and have tested in a separate file... but when I add it to my actual course, the variable does not change. What could be going wrong?
Hi Clifton!
Do you have a sample file we can look at to see what you've created so far? Seeing the file is helpful, so we can offer specific advice for adjusting the variable in your course.
You might also check out this thread: https://community.articulate.com/discussions/articulate-storyline/ensuring-a-random-number-is-not-re-picked
This discussion is closed. You can start a new discussion or contact Articulate Support.