Layers and quizzes

May 26, 2015

I would like to build a quiz that exists on layers in a slide, but can't work out how to do it. 

I have an image of a security keypad, and I want the trainees to punch in the correct keys in the correct order to disarm it. I've tried layers with triggers and a variable that changes depending on the invisible button the click, but I want to make it so storyline marks it and measures attempts for me. 

12 Replies
Jordan Ash

Hi Amaan,


I was trying for a way to get this to work for you last night and have come up with a solution which can be viewed on my attached story file.

I have set four variables for each separate number position in the keypad entry. 

I have then added hotspots above the numbers so that when you click them it sets variables to the number clicked.

I have then added another variable which counts the number of numbers clicked, this variable will decide what number to change when clicking on a number.

The clear button is set to put the number counter back to 0 and to clear the numbers.

The submit button is programmed as a click one free-form quiz, there are two buttons here layered over the top of each other and the correct one will only show when all 4 number variables are correct. In my example I have set the correct answer as 1 2 3 4 however this can easily be changed in the triggers column. 

To do this at the top of the triggers column there is one which says change state of enter correct "rectangle" to normal when position changes and number 1 is equal to 1, number 2 is equal to 2, number 3 is equal to 3 and number 4 is equal to 4. To change the number change the equal to numbers to the ones of your choice.


Hope this helps



Jordan Ash

Hopefully this will explain it better for you. Also I would be more than happy to have a look at your source file and see if I could get it working for you.


There are four numbers displayed on the digital display at the top of the keypad.

Each of these displayed numbers are linked to separate variables.

“Number 1”

“Number 2 “

“Number 3”

“Number 4”

There are transparent shapes over all the twelve  buttons which allows you to click them.

When he user first clicks any of the 10 numbered buttons 0-9 the  value of the variable “number 1” will change accordingly. So if the user clicks button 3 the value of the first Variable is set to ‘3’

The selection or each of the displayed numbers in sequence is determined through a  fifth variable “number position” which will add 1 to it. So after the first number is selected the 5th variable increments by  1 to 2 and now looks at  the second digit

( value 2) now when the user clicks on one of the 0-9 buttons it will change the value of the second digit and also increment the 5th variable again so that it now has a value of 3 and looks at the third digit

The clear button again has a transparent box over it. When the user clicks this it changes  the variables “number 1” “number 2” “number 3” and “number 4” to 0 and resets the “number position” variable to 1.

To use the enter button I have used a freeform “pick one” quiz question. 

The enter button has two transparent shapes on it. The first which is always there is the incorrect button. 

The second correct button is placed above this and it has an original state of hidden. This will only change to normal when “number 1” “number 2” “number 3” and “number 4” are the correct numbers. 

The correct sequence is determined by the trigger; change state of enter button correct to normal when variable changes “numberposition” and if “variable 1 is equal to _” and if “variable 2 is equal to _” and if “variable 3 if equal to _” and If “variable 4 is equal to _”

The correct sequence should fit into the blank spaces into the blank spaces.



Midi Prefix

You can also use multiplication to update the number. If you multiply by ten each time it offsets the digits, so you could use one variable and check for the final value. This doesn't work with 0 as the first digit if you are including zero, but you could get round that with a special if statement to check for this and manually solve it. Seems like you have a system anyway though.

C_ Cudworth


Hoping I can resurrect this thread to find a solution because I am a novice user. I have been looking for a numerical keypad to enter quiz answers. I have used this very excellent keypad but I have one problem...

How do I display an empty text box prior to user entering correct digits? If you examine the attached .jpg, I want to ask math questions regarding times tables but want the text box blank before the user types in correct answer.

Thanks in advance.

Jordan Ash

One way of doing this could be to replace the number variables used with text variables. Text variables can be left blank unlike number values. 

Remember to update all the triggers to refer to the new text variables rather than the number variables. You will also need to update the variable references in the text entry box to reflect the names of the new variables.

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