4-digit Code Combination (True/False and/or Hotspot)

Feb 28, 2020

Hi everyone,

I'm very new to Storyline and all things e-Learning (mostly worked in Rise with prebuilt stuff). I have now been tasked to build an interaction in Storyline which I'm really struggling to realise. Here's the jist of it:

It's a 4-digit password, where only one combination is correct - example 1234. On a keypad, the learner must select exactly those numbers and in that order for the combination to be true - all other combinations (and the respective order of number put in) are false. Also, on a display, the number the user clicked on is shown, e.g. User clicks Number-1, digit 1 is shown in Display.

My issue is, do I have to set triggers to be false for every possible number combination on the keypad - or is there a way to make it shown, that all other inputs are incorrect? Also how can I set the numbers to show in the display in the exact order the learner clicked it, specifically when the same number is being clicked on multiple times. Or will I have to use JavaScript in order to accomplish this?

I've checked out the following sources in the Forum already, and I'm trying to implement or "combine" them, but it's not working out at all for me...unless of course I set like a million triggers (which is what I'm trying to get around).

https://community.articulate.com/discussions/articulate-storyline/variables-for-a-keypad
https://community.articulate.com/download/storyline-360-find-the-safe-code-game
https://community.articulate.com/download/storyline-360-combination-lock-quiz

Thanks so much in advance for any assistance!

3 Replies
Richard Mulcahy

Attached is a sample. 

I first setup a counter variable and increment the counter every time a number is pressed. When the counter reaches 4 I then evaluate the answer for correct and incorrect. There are also 4 other variables created for each display position.  When first number is pressed the counter is one and so that key number is stored in the First display position. When a second key number is pressed that number (could be the same number) is displayed in the Second position because the counter is now 2.

There is a trigger setup for each key number to inc the counter and also set the Display position (based on the counter) to the key number.

After the counter reaches 4 I evaluate the 4 Display positions variables to make sure they match the correct answer which is 1 2 3 4. I have a Correct and Incorrect layer.

 

 

This discussion is closed. You can start a new discussion or contact Articulate Support.