Forum Discussion

ITIAcademy's avatar
ITIAcademy
Community Member
3 years ago

using a random variable with numbers that are not repeated

Dear community, 

I have to build a game that should allow the employees to pick randomly a place to work when they arrive at the office every morning (flex desk). This means that the numbers shouldn't be repeated.

is it still not possible to ensure that a random number is not picked again using a Storyline funcionality? is it still needed to code this using javascript as explained in this post from 4 years ago? https://community.articulate.com/discussions/articulate-storyline/random-number-variable-no-repeat?

  • Just javascript or you can add triggers to check if it has already been pulled, but the more larger the range it may not be viable.

    • ITIAcademy's avatar
      ITIAcademy
      Community Member

      Hi PHil,

      thanks for your answer. It's just numbers between 1 and 12 and 1 and 6.

      Any example of the triggers that I should use to check if a number has been pulled?

      thank you

    • ITIAcademy's avatar
      ITIAcademy
      Community Member

      Dear Phil,

      you already did a lot to help me, but I will try my luck again:

      the team enhanced the requirements and now we have two zones to choose a working place, so, the game I am creating needs to provide first the option to choose an area and then in that area the employee should be able to select a working place. I have used the file you sent me and I have enhanced it with a wheel of fortune to select the working places, but I have the following problems:

      1.  the wheel doesn't run the first time I click on "spin", just after the second time I click and the system selects a place, then the wheel spins.

      2. how do I make that after each person selects an area (either busy or calm area)and in that area selects a place, that the game returns to the beginning to allow the next person to select area and place to work, but recording the places that are already taken

      3. It can be that one of the areas is full and the employees have to go and select the working place in the other area.

      You will find attached the file with the work done until now.

       

      Thanks in advance for your reply and support

       

      Best regards

      Katalina