How I created a Custom Quiz-style Interaction in Storyline 2
Recently a friend of mine contacted me as he had an idea for an interaction he wanted to create in Storyline 2 and needed some help with building it.
He wanted the interaction to work like this:
- A question with five answer options.
- Two of the five answers were correct.
- Only a maximum of two answers could be selected.
He also wanted a ‘submit’ button and once clicked, then he wanted:
- Feedback for each answer to be shown.
- An indication of which two answers were correct.
- To still see which two answers were originally selected.
With a bit of experimentation and a few prototypes I was able to create something that met his needs and this post is about how I got there.
Originally I thought about using a freeform question slide but as I didn’t need to worry about scoring so I went with a regular slide.
I started by inserting a place for the question and the five answer options on a slide and I also created a ‘selected’ state for each answer option. Next I created a submit button and set the initial state to hidden – my idea was to change it to normal when two answers are picked (or become selected). I’d also need to make the other three un-selected answers become inactive once the second answer had been chosen. I abandoned this idea when I realised all the triggers I’d need to make it work.
My next idea was to create a layer and place the submit button on this own layer. The reason I did this was because I remembered that in the layer properties there’s a setting where you can prevent the use from clicking on the base layer (click in the box to turn on the setting):
Using this setting would take away the need to come up with triggers for making the un-selected answers not work as once this layer is showing nothing on the base could be clicked on. But I did need to figure out triggers to make this layer show – which was after the second answer was selected – based around the state of my answer options. So with 5 answer options there’s the following 10 selection combinations:
1 and 2, 1 and 3, 1 and 4, 1 and 5, 2 and 3, 2 and 4, 2 and 5, 3 and 4, 3 and 5, 4 and 5.
So my 10 triggers to show the layer with the submit button on it (based on the state of the answers) were variations of this:
Note: In this trigger, the order the answers are chosen doesn’t matter so choosing answer 1 then answer 2 is the same as choosing answer 2 and then answer 1.
Once the layer with the submit button is showing, users are not able to click on the base layer and select any other answers (in hindsight, the way interaction is set-up means that you can’t change your answers once you’ve picked two). The trigger on the submit button is to show another layer that contains the feedback, which answers are correct/incorrect and it still shows the selected answers on the base. I positioned the answers on this layer showing which are correct/incorrect directly over the answer options on the base which means the selected state showing.
As this is a prototype I haven’t focused on the slide design, it was more about seeing if I could achieve the functionality he wanted. Click on the image below to see a demo and if you’d like to download the .story file click here.