Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

September 7, 2018

Storyline Tutorial: Counting Answers

Sometimes we want to make sure that users attempt an interaction or select the right amount of options. While such mechanics alone are not helpful in ensuring that "people learn", they are great if you want to customise feedback or course content, or if just prevent accidental errors and attention slips.

While Storyline makes it easy to check if the user selected all, one or none of the options, when it comes to n-amount of answers out of many, things get a bit more complicated. In the following example, we'll solve this problem by creating a simple interaction that will count the amount of answers selected and will warn the users if they have selected too few or too many. In this case, the users will have 6 options to choose from and they need to select exactly 3. You can see the finished example here. 

I've created a Storyline 360 file to get you started (download it here). But if you wish, you can follow this tutorial in your own. Here are the elements you'll need:

  • Objects to choose from (make sure they have the "Selected" state)
  • Submit button (either your own or the one in the player).
  • Layer with feedback for less than 3 answers selected
  • Layer with feedback for more than 3 answers selected


With the set up out of the way, time to add some interactivity. First, create a number variable "AnswersSelected". As the name suggests, it will be used to track the number of answers selected.

Then, select the object "Option 1" (if you're using the tutorial file) or any interactive object (if you're working in your own project) and create the following trigger:




At this point you can add a text box with the variable reference to the slide and preview the slide to check if the trigger is working:

1 is the value of AnswersSelected variable.

If it is working and the variable value is changing with the object state, go ahead and copy this trigger to all other objects. As you paste the trigger, you will notice that all trigger references to "Option 1" automatically change to "Option 2", "Option 3" and so on - depending on which object you are pasting the trigger to. As you can see, copy/pasting triggers can save heaps of time (but only if you make sure the trigger works before copying it).

As you have most likely noticed, at this point the value of the AnswersSelected variable will increase each time an object is selected. So, if you select and de-select the option "Bacon" three times, the course will think that you have selected three answers. So, we need to find a way to track when an answer is de-selected.

These are definitely not the results we are looking for...

Since we add 1 to the variable value whenever an object is selected, we will create trigger that substracts 1 if the same object is de-selected. To achieve that, create the following trigger:


Now, preview the slide once again and verify that the variable value changes correctly when you select and de-select the same object. If it is working (and it should), copy it over to other objects.

With all triggers added, preview the slide once again and check if the variable value changes correctly. At this point it should, but in general, I recommend verifying your work often, so that you can pick up any issues early on and therefore troubleshoot them easier.

Although it is clear that bacon is the only choice that matters!

For the final touches, create a trigger to show feedback for less than 3 answers selected:



Then, copy/paste this trigger and change the name of the layer and the value of the variable to show feedback for more than 3 selected answers.

Finally, create a trigger to allow the user to continue if they selected exactly 3 answers:



And that's all there is to it - preview your work and enjoy!

August 27, 2017

Storyline Tips for Speed, Precision, and Your Sanity

In this post I wanted to share some tips that made my development process more efficient and precise. There are many tips about saving time and effort in Storyline. Most likely, you've already heard about the benefits of the format painter and slide masters.  Therefore, I tried focusing on things that were rarely mentioned or not obvious to me at the start.

Number your objects

We all know that naming layers and objects on the timeline is a good idea so that you know which one of the 10 "Rectangles" is your custom-made "Submit" button. Sometimes though, giving your objects numbers instead of names may be more efficient. 

For example, let's say you are working on an e-learning filled with complex terminology like "agranulocytosis" or "propylthiouracil" or some other Lovecraftian-sounding language. And let's say you need to provide additional explanation for three of these complicated concepts. You create three buttons for the learner to click to see the matching layers with additional content. Or maybe you create a drag and drop interaction where you need to match the complex terminology with its description.

It may be easier to match "Drag 1" to "Drop 1", rather than trying to remember if "Shampoo" is "Step 3" or "Step 4".


In this case, instead of using the actual terminology from the course, I use numbers. This helps me to save time not only on typing or copy/pasting, but also reading and comprehending what is what. I find it much easier to match "Layer 1" to "Button 1", than "Layer Triiodothyronine" to a similar clickable object. Lastly, it is gives a much cleaner Trigger list for double-checking if everything matches. 

Ahhh. A treat for a Sheldon Cooper within you.


Number your variables

Same can be true for variables. I prefer to give them numbers, with a one-word description, if necessary. For example: 3_33_L1Seen. This tells me that this variable tracks whether or not the user has seen Layer 1 on slide 3.33.  The reason I number my variables by scenes and slides, is that if I need to come back to the project after a break or an interruption, I can easily remember, which variables are related to the slide I'm working on (since I can always see the number of slide, but I may not always exactly remember what was the variable name: was it L1Seen or Seen1L?).

Since I know that there are 6 clickable objects on the slide, I can quickly check if they are all accounted for by looking at the numbers. Using slide numbers in variables helps you find them in the list, if you're using a lot of them.

In addition, it makes the "sanity check" quicker. When I need to double-check if everything is accounted for, I don't need to read the names of the variables and correlate them in my mind with the named objects. I compare numbers with numbers instead. Faster and less straining on my cognitive resources.

Conveyor-belt approach to changes

Let's say you need to change 3 things on 5 slides (and you can't do this with master layouts). What I've noticed many tend to do (and what I did myself before) is to go slide by slide and make all adjustments on each. While this may give you the satisfaction of having each slide done before moving onto next, I find this strategy inefficient. Think about it - you have to keep in mind at least three things. You also need to make sure you do not forget to do any of them even if someone distracts you. Then you actually need to do them, which also requires your attention and cognitive resources. It is actually hard, particularly if you're working in a busy open office.

When I "conveyor-belt" my tasks, I can focus only on one task at a time and don't need to mentally switch between them. This way I am more likely to get into the "flow", which gives me a faster pace. So, I go through all the slides, make one change, tick it off the list. Then go through the slides again, making another change and tick that one off, too. It sounds like it would take more effort, but I found this much easier purely from the cognitive load perspective.

Create one thing, test it, then copy it

This can be said about pretty much anything: buttons, exercises, typical slides, quizzes - anything that you may want to reuse. I used create all of the elements on the slide. For example, if I had a menu with 4 buttons, I would make all four of them and then test how they all work. These days I create one button and 3 placeholders. Then I make sure that I like it and it is working as intended (because if it doesn't, I'm about to create a lot more work for myself). Then I either copy/paste the finished object or use "Format Painter" on the placeholders. 

Copy/pasting  works particularly well for copying something to another slide. When you copy an object to another slide, it inherits:
  • Position on the slide
  • Position on the timeline
  • Formatting
  • Triggers 
  • Animations


It's not immediately obvious, but you can also copy/paste layers with their triggers, including into other slides.

Precise position

When my placeholders are on the same slide, copy/pasting will preserve the formatting and triggers, but not the position. But let's say my placeholders were perfectly arranged and now I want the copies of the actual objects to appear exactly in the same place. Let's also assume that my  finished object also has triggers, which I want to keep, so using a Format Painter is not that efficient.

In this case, instead of copying and then manually dragging the elements across the slide, I use the Size and Position dialogue. To open it, select any object and press Shift+Ctrl+Enter. I note the coordinates of the placeholders and then enter the same numbers for the position of the copies. I can then delete the placeholders by selecting them on the timeline. 

No more eyeballing, mouse-wrangling or nudging. Quick and easy.


Precise crop

This option is not obvious at all and it took me a while to notice it. If you need to crop an image to a pixel (and you want to use Storyline, rather than an external tool), don't waste time and patience on the Crop button. Instead, select an image, press Shift+Ctrl+Enter to open Size and Position dialogue again, and enter the crop values there, under Size tab. Pixel-perfect crop with the synchronous preview. 

Badum-tshh! Word of warning - does not work well with flipped/mirrored images, so crop them before you flip them.

"Set as Default…"

Want to make sure that all of the text boxes you create from this point onward have 8% transparent background fill, #3333333 color text and 30 point margins on all sides? Create one element and format it as you wish. Then right-click it and select "Set as default…" in the menu. From now on all text boxes that you create will inherit these settings.

The "default" settings are separate for shapes, text boxes and buttons.

"Change Shape"

Let's say you made a square shape, added all sorts of fancy stuff to it, but now you need it to have rounded corners. Instead of deleting the old object and recreating everything from scratch, you can simply use Change Shape option in Storyline, which works exactly as the same function in PowerPoint. The only thing you may need to adjust is the shape size.

Select a shape, click Format in the Drawing Tools and choose Change Shape.

Note that this may not always work well with objects that have multiple states. For example, if you change a square button into a rounded square and adjust the size of the corners, the corner sizes will not be inherited by all states. Change wisely.



Liked some ideas? Hated some ideas? Found a typo? Let me know in the comments or reach out to me through my fancy (hey, there is "fancy" in "infancy"!) new site. 

August 14, 2016

ELH Challenge 140: Slide Transitions and Back Navigation

For this week's ELH Challenge (ADDIE model) I wanted to make something short. Therefore, highly interactive branching scenarios were out of scope, as well as anything that would require custom writing (as you can see by the frequency of my blogging, I'm not exactly a fan of writing in my spare time). Therefore, I settled on this demo which describes ADDIE phases and touches upon their possible combinations/order.

Since my submission was relatively straightforward (no variables here!), in this post I would like to talk about one of the aspects that is probably very easily missed - back navigation (what happens when the learner wants to go back). In the context of this challenge, I will focus specifically on slide transitions and the impact of back navigation on my design choices for this ELH Challenge.

While most of the time back navigation is straightforward, in certain cases, particularly if you're tailoring animations and slide transitions to make your course look good while the learner progresses towards the end, overlooking back navigation may be detrimental to the experience you designed. For instance, let's review the slide transitions in my submission:


As you will notice, when we move from the title slide ("ADDIE") to the "Analyze" slide, we zoom into it. The slides for the other phases (Design, Develop, etc.) use "Cover: From Left" transition instead. My logic behind this choice was to create a feeling that we are "zooming" (= looking closer) into the ADDIE abbreviation and then move from letter to letter to explore their meaning. This is why the first slide use "zooming", while the other slides use "Cover" (more on "why Cover and not something else?" later).

In the example above you will also notice, that if we go to slide "Design" and then navigate back, the slide "Analyze" will use a different transition. Since I was trying to create a feeling of moving between letters, I wanted to avoid this: 


This is not disastrous, of course, but it does contradict the idea I am trying to communicate and is quite jarring.

To ensure smooth back navigation, I added a duplicated "Analyze" slide and adjusted the navigation tied to the player buttons:

Better user experience but more maintenance


As you can see, the only way to get to slide 1.2 is from the title screen. All other navigation paths include slide 1.3. (which is an exact duplicate of slide 1.2 but with a different transition animation).

This might not be the best solution for the courses where you would need to update the course content very often (as you will need to make corrections in both copies of the slide), but for a stable content this might be a good workaround which would not require too many triggers/conditions or animation paths.

As mentioned before, I should note the reasoning behind the "Cover" transition for other slides. Usually, to create an illusion of movement or uninterrupted flow between slides, I would recommend using "Push" transition, particularly if you're not allowing back navigation. However, look at what happens if I use "Push" transition in this case (remember, we want to feel that we're moving from left to right of the "ADDIE" abbreviation):



As you can see, this presents two issues. Firstly, the off-slide parts of the letters are cut-off, creating a rather ugly transition effect. Of course, this could be fixed by creating a different design, for example, by placing the letters so that they do not bleed off the left or the right edge of the screen. However, there is a second issue. When you click "Next", the slides are moving to the right, which is also the the direction that the "Next" button is indicating. When you click "Previous", you subconsciously expect that the previous slide will slide into the frame from the left slide, pushing the currently displayed side to the right. However, this doesn't happen. Instead, when you click "Previous", you see the same animation as if you were be navigating forward. I found this highly confusing and I'm confused by my own module, that's usually a sign that I need a different design solution! 

With this in mind, after trying different combinations of transitions, I settled with "Cover", as it seemed to be the least confusing of all. Of course, there is a chance to create an amazing transition with the help of animation paths and other effects, but this will be my exploration opportunity for the next challenge.

Do you know a better way or have seen examples with great experience for back navigation? Drop me a line in the comments (or Twitter - @GamayunTraining).

July 21, 2016

How to Create a Stealth Action Puzzle Game in Storyline 2

In this post I wanted to describe the design and development process of my submission for ELH Challenge 137 - a remake of the computer game Hitman Go (if you haven't played the game, consider looking at this gameplay video on YouTtube). I'm going to outline some pre-history of the project, describe my design process and what was going on in my head, what I spent time on, which elements of the submission had what reasoning behind them and why, as well as talk about the actual development of the module in Storyline 2.

The 3rd level of Catman Go (working title)

Background

I started experimenting with this idea a while ago, aiming not to think about the visual design and focus solely on the technical functionality. I also wanted to try and make a board that would scale or scroll (like in this great example by Rais Omar) and the game piece that could be dragged. If you're curious, click here for a published slide from my original experiment.

Although I learned a lot and I was happy that I did this experiment, it turned out to be too much work for a "stupid side project", particularly when it came to designing an elegant solution for preventing the player to drag the piece straight to the exit. Thus I shelved it and made a mental note to come back to it sometime later. Thankfully, ELH Challenge helped me revisit this project and implement the things I learned in its new version.

For the Challenge, since wanted to have a finished product without too many shortcuts, I decided to narrow down the scope of my creativity and cut down the number of features. Specifically, I decided to get rid of dragging and dropping and abandon the idea of a scroll-able board.

Design 

I started my design process with a research. Essentially, I did a lot of image searching in Google, Dribble and stock image websites, to saturate myself with images of game boards and screen-clipped anything I liked into OneNote.

With this done, I started designing the layout of the largest level in Inkscape (a free open-source alternative to Adobe Illustrator). Since I abandoned the idea of a scroll-able board, I needed to know how much real estate will be occupied by the essential elements: fields, pieces and goal tracking.

With two levels compared, I had an interesting problem of having too much real estate on the first and just right on the last level. Therefore, I needed something to fill the void on the first level without breaking the unity of the overall design. After playing around with various wild ideas, I settled on the design that used the field grid from the last level with the extra fields being clearly unavailable. I achieved the effect by making the fields semi-transparent and removing the gray connectors between them.

As a side-note - while the need to have fields and pieces is quite obvious, you might wonder why goal tracking was important in such a simple game. Well, when playing Hitman Go, it took me approximately 10 or more levels to figure out where I can find the level goals... Since I consider myself a person of a reasonable cognitive ability, and I only had time to create three levels at most, I needed to make sure that my users don't miss the goals. In addition, as you probably know, it's a good instructional design practice to keep the task visible or within an easy reach of the learner.

With all the elements created and arranged into the final level layout, I used Palettable to create a color-scheme matching the mood of the game, which I then applied to my design. Well, technically, I came up with 4 color schemes and engaged my family and friends to select the ones they liked.

The logic behind the final coloring was this:
  • Movement (beige) - the fields themselves and circles along the path
  • Direction (gray) - the connectors between fields
  • Focus points (black) - the cat itself and the arrows indicating the lines of sight
  • Goals (white) - mice and goal text
  • Background (blue)
Surprisingly, I spent quite a lot of time choosing fonts for an interaction that has a minimum amount of text. Below is the original font line-up I was choosing from (as well as an example of an alternative color scheme):

Early font candidates

I discarded all the fonts that looked too straightforward/elegant/boring for the context of a game fit for a kid (such as Raleway). Then I discarded the fonts that looked hand-written (e.g. Apple Boy) or were too elaborate, since, in my opinion, they did not agree well with a precise and geometric design of the game board. The final candidates were Perfograma and Showcard Gothic. As you can see, Perfograma looked cool but still too sophisticated for a game like this - not fun at all:

I think it wants to spell "No fun allowed"

In comparison, Showcard Gothic was definitely winning the battle, particularly when paired with another font (in this case - GrilledCheese) and a little sad face:

Nothing says "fun" as a sad face, right?

Development 

To avoid recreating all of the elements in the Storyline, I exported them from Inkscape as .png files instead. While a time-saver for development, it is definitely a time-sink for any future changes. For example, if you use one and the same image for 20 objects, Storyline does not let you replace that image with one click (unlike Captivate or Construct 2, which store images as global assets rather than individual objects) and you have to replace every single object (unless you want to mess around with the published output to replace the images there, or resort to other hacks). Do this only if your art is too complex to be created in Storyline, or if you're really sure that nothing is going to change in terms of colors or shapes.

Since I designed all my levels in Inkscape, I knew exactly how the end project would look like, therefore I started with the biggest level and worked backwards from it. This way, instead of adding more triggers I had to delete unneeded objects and then delete any triggers with "Unassigned" values in them. The rest of the triggers I simply adjusted to match the demands of the level.

Let's take a look at how a level is built.

Objects

Each field is an object with three states, as you can see below:


By default, all fields are set to "Disabled", except the fields into which the player can move. This was done to ensure that the player doesn't just click on the "Exit" field from the start.

Every field had a number assigned to it and reflected in its name on the timeline. To keep my sanity and make the development and testing faster, I added a separate layer with the field numbers to serve as an overlay:


I kept the numbers consistent throughout the module, which helped me greatly in reusing the triggers. The only difference is the Exit field, which is always 99, as it had a different set of triggers.

The mice are separate objects. I thought about adding them to button states, but decided that this would complicate an already complicated system and added them on top of playing fields instead. The mice have the same numbers as the fields they are standing on.

Variables and Triggers

Technically, the game uses only two types of variables: one variable to track the currently active field and a true/false variable to track the state of each mouse. Here's the list of variables actually used in the module:


The variable "FieldSelected" changes when the player clicks on a field to move the cat. For example, if a player clicks on Field 12, the variable value is set to 12. The same trigger was added to mice as well, as otherwise the player would have to click the areas around the mice. For mice, however, you need to make sure to add a limiting conditions to the trigger, as otherwise players can click on each mice whenever they want:

Mouse can be clicked only if the field it's on is enabled / active.

Alternatively, you can set the mice to state "Disabled" and create triggers to enable them, based on the value of "FieldSelected" variable. This way you'd have to make more triggers, but on the upside, the player won't be able to see the "hand" cursor when the cursor hovers over the mice.

In order to enable/disable all buttons correctly, you need to write two slide triggers for each button:
  • Change field state to "Normal", if the value of the "FieldSelected" variable equals to the value of the nearby fields.
  • Change field state to "Disabled" if the value of "FieldSelected" does NOT equal to the value of any nearby fields. Note that in this case, if you need to have several conditions, the logic should be AND, not OR.
For example, in the situation below, Field 13 would only be enabled if "FieldSelected" equals 12, as Field 12 is the only field from which a player can reach field 13:

Playing fields

Consequently, if "FieldSelected" does not equal 12, Field 13 should be disabled.

For each mouse, you will need to create three triggers, following this example:

Mouse triggers

Essentially, you need a trigger to interrupt the gameplay if the mouse is not dead when the player moves to a field it's observing (in this case, field 11). Secondly, you need a trigger to "eat" the mouse (variable MouseDead = true), if the player sneaks up on it. Thirdly, you need a trigger to hide the mouse once it's been "eaten" (variable "MouseDead" changed to true).

In other words, you'll need two triggers per each field to manage its states, one trigger per field to adjust "FieldSelected" variable and three triggers per mouse to interrupt the gameplay or manage the state of the mouse.

Final Touches

I was listening to Cat Purr Generator while working on this example and I wanted to add some of that ambiance to the game. I didn't want to spend a lot of time on looking for matching royalty-free soundtracks, therefore I decided to limit the audio to occasional "feedback" sounds: a meow when the cat eats a mouse, a hiss in case of failure and a content purr at the end of the level.

Lessons Learned

  • Set a clear and manageable scope for your project.
  • Design for largest and smallest amount of elements on the screen.
  • Start development with a very clear goal in mind.
  • Work from hardest to easiest (may not always be true, but applies in this case).


July 15, 2016

Creating a Badge Interaction in Storyline 2

In this post I will walk you through the creation of this badge interaction in Storyline 2, which was a part of my submission for this ELH Challenge. Please see my previous post for more background and context for this interaction.

This tutorial is quite detailed, however, it assumes that you are familiar with the interface, tool names, and know how to create variables, objects and states. By the end of this tutorial you will create 4 slides: three slides for badge creation and one for badge overview.

Step 1: Create the first slide

Create a blank slide with the background color of your choice. Since we will be using animated transition in this interaction, I recommend using a simple solid-color background.

Step 2: Start the badge 

Start by creating a blank badge on the first slide. You can use a "Rounded Rectangle" shape and fill it with the color of your choice or the color of actual badges if such are used within your company. In my example I'm using #F3F3F3 color for both fill and the outline.

Add the text box with the question "What's your avatar?" Adjust the text size and properties as you desire. In this example, I'm using Open Sans, size 44, text color #C45500 and the text box has the same width as the badge.

Make sure that your badge shape extends slightly beyond the slide on the bottom. It doesn't matter how far it goes, as long as it extends beyond slide limits:


While you can adjust the image to the bottom of the slide, so nothing spills over, but I prefer making shapes larger than the slide to make sure that there are no gaps or surprises later on when we'll add the slide transition.

Optional detail

To create a lanyard hole in your badge:
  • Draw a small rounded rectangle shape and adjust the rounded corners to maximum.
  • Fill the shape with the background color (use Eyedropper if you didn't save the color in the palette).
  • Add an inner shadow to the shape. In this example I'm using "inside top" shadow, as I'm assuming that my light source is at the top of the screen. 

Step 3: Copy and adjust the badge

Duplicate Slide 1 to create Slide 2. Delete the lanyard hole if you created one and change the question text to "What's your name?". Then adjust the height of the badge so that it extends beyond the slide borders on both top and bottom:


Don't forget to adjust the position of the text box. For example, you can use these position settings:


When you're done, duplicate Slide 2 to create Slide 3. All you need to do here is to change the text of the question and drag the bottom of the badge up so that that the shape extends beyond the top slide border only:


Step 4: Set up transitions

Select all three slides and add the Push / From Bottom transition to them (note that if you're working on a real project, you may want to change the slide transition for the very first slide, depending on what type of slide or interaction precedes it). This way you will achieve the effect of the badge moving/scrolling as if before the user's eyes.

You can preview the project at this stage to check if everything works well. The transition should be smooth and the badge should not "jump":


Step 5: Photo selector - create objects

Go back to Slide 1 and create the following objects (feel free to adjust these to your needs or design):
  • Background for the avatar.
  • Two buttons or shapes for paging between the avatars. Note that both of them should have a "Disabled" state. 
  • Button to save the avatar.
  • An avatar with as many different states as you like. 

Objects on Slide 1

For making your life easier later on, I recommend naming the states with numbers, starting with 0. As a result, you will have a "normal" state, state 0, which is a duplicate of "Normal" and as many additional states as you need:


Why? This is because of the triggers and variables we're going to use later as you will need to match the state names with numerical variable values and matching state names will help you avoid confusion. If you feel that what I just said doesn't make sense, don't worry - just try creating and naming the avatar states as you see on the screenshot above and you'll see the system behind this madness later, I promise! For the rest of the tutorial I will assume that the amount and names of your avatar states match the ones on the screenshot.

With the avatar states created, set its initial state to "0".
If you're wondering why I am using avatar states rather than creating separate objects - in my opinion, states reduce visual clutter on the slide and often reduce the need for triggers. When a trigger changes an object's state, all other states become invisible, without any additional efforts on your side. If instead of 10 states you have 10 objects, you will most likely have to write either more or more complex triggers to manage their visibility and states. 

Step 6: Photo selector - create variables

With your objects created and arranged, create the following numerical variables:
  • ClickCounter (default value 0): to enable/disable avatar selection arrows and help Storyline understand which avatar state it should be displaying.
  • AvatarSelected (default value 0): to store the information about the selected avatar for further use throughout the course.

Step 7: Photo selector - create triggers

By now we have prepared all our objects and variables. Now we're going to bring them to life. Our end goal for the photo selector is to ensure that the user can page back and forth between the avatars and that the avatar selection arrows become disabled when the user reaches the end of the avatar selection. 

In case you haven't done so, name one of the buttons "PhotoNext" and the other "PhotoBack" to avoid confusion. Change the initial state of PhotoBack to "Disabled".

Create the following trigger for PhotoNext:


And a similar trigger for PhotoBack, except in this case we will be reducing the ClickCounter value by one:


This way we can tell the course what the user is doing with the buttons and which avatar should be displayed.

Next, let's add a trigger to change the state of the avatar based on the value of the ClickCounter variable - this is where avatar state naming becomes handy!


Repeat this for each state of the avatar you have, except state Normal which we don't count in this case:

As you've probably noticed, the creation of triggers is easy because the state names are identical to the values of clicks. In other words, if the ClickValue is 5, Storyline should display avatar state 5, if the value is 3 - state 3 and so on. This way you can have as many states as you want without losing track of what should happen. Way better than naming your states "Male01" or "FemaleYoung-10-happy".

At this stage you can preview the slide to admire your work. If everything worked well, you will be able to flip through the avatars, but you won't be able to go back, since we set the PhotoBack button to appear disabled from the start and didn't create any triggers to enable it. You'll also notice that there's no limit to how much you can click PhotoNext button. Let's correct that.

Step 8: Photo selector - create intelligent buttons

In essence, we need to enable PhotoBack button as soon as the user navigates away from Avatar 0 but disable it back when the user returns to Avatar 0. Similarly, we need to disable PhotoNext button once the user has seen the last avatar in the series and enable it once the user goes away from the last avatar. 

Let's create triggers for PhotoBack button. This trigger enables it: 


And this trigger will disables it again:


As a small challenge for you, I won't include instructions for creating triggers for enabling/disabling PhotoNext button, but I can tell you that they are pretty similar.

Step 9: Photo selector - sanity check

Create a text box anywhere on the slide and add text %ClickCounter% to it. Alternatively, you can use the option Insert / Reference. Don't worry about formatting or position, this is just a way to verify that the value of clicks matches the state of the avatar. 

Preview the slide, click the back/next button, check that the ClickCounter variable adjusts properly and that the avatar states and the button behaviour match the variable values: 

Photo Selector in action (note the changing variable value)

If all is well, delete the text box with the variable reference. 

Step 10: Photo selector - saving information

Finally, we need to make sure that the course can remember which avatar did the user choose. For this you will need to create a very simple trigger like this: 



In other words, if current avatar's state is 0, the value of AvatarSelected should be set to 0 when the user clicks "Save" button. If avatar's state is 1, the value should be 1, and so forth. Again, numerical state numbers are helpful here. 

Duplicate the trigger and adjust variable values/state names until you've covered all avatar states. 

Congratulations, you've created the most complicate part of this interaction! 

Step 11: Name field

On Slide 2 we will collect user's name to use it throughout the module. First, you will need to create at least the following objects:
  • Question (you should already have the text box with the big orange text)
  • Text Entry field (you can find it in Insert > Controls menu)
  • "Save" button or shape
You can, of course, add more elements. 

Objects on Slide 2

You have probably noticed, that when you create a new Text Entry field, Storyline automatically creates a text variable called TextEntry, as well as the trigger that changes its value based on what the user typed into the text entry box: 


To avoid confusion, you can rename TextEntry variable into something more memorable. In this tutorial I'll assume that you renamed it to Name. 

Technically, once you've done that, there's not a lot left to do on this slide, since the trigger for adjusting the variable has been created automatically and you don't have to do anything else. However, in this example, I wanted to prevent users from not entering anything. With this in mind, I added two triggers to the "Save" button:


This way the user cannot proceed until they have entered at least something into the text entry field. My objective here was to prevent blank values due to attention slips. While the name of the learner is not critical to this module, I didn't want to have any blank values as these would look like errors or strange issues in the e-learning. I didn't worry about gibberish entries (e.g. Ahkjhakshj) as that would be the user's choice. A blank value, however, could be more confusing, as well as not a user's choice. For instance, let's say a user wanted to enter their name, but got distracted. When they came back, they had to hurry up, so they forgot that they didn't enter any name and just clicked "Save". In this situation, having a reminder that the name hasn't been entered may be quite helpful.

Step 12: Department selector

In the real project this interaction is based on, the branching and flow of the slides as well as the type of content presented to the user depended on the nature of their work. Therefore, I needed to gather some information about what my users do. You can use the same idea to display content to users based on their seniority (New Hire vs Veteran employee), position in the department or company (e.g. Junior Associate vs Senior Associate), or location (e.g. Berlin vs Frankfurt; USA vs UK) and so on. 

In this example, I have only three mutually exclusive options available for selection: phone, e-mail, chat. To recreate the same slide, you will need:
  • a question (which you should have)
  • a radio button for each available choice
  • "Save" button or shape
Objects on Slide 3

Once you have created the radio buttons, add them to a Button Set. This way you will need to write less triggers. 

Then create the following True/False variables, all with the default value of "False":
  • Chat
  • Phone
  • Email 
Of course, you can match the names of the variables to the choices you have created.

For every radio button you've created, add two triggers. One of the triggers should adjust the matching variable to the value "True" if the button's state is selected. Second trigger should adjust the variable value to "False" if the button's state is not selected. For example:


Since the radio buttons are in one Button Set, their states will automatically change to normal one another radio button is selected and the variable values will be adjusted without any additional triggers.

Step 13: Prevent user errors

Since navigation and the slides displayed depended on the user's input at this stage, it was crucial for me to ensure that the user does not leave the slide without making a choice. 

To prevent the users from navigating away from this slide, you can add two simple triggers to the "Save" button. One to allow the users to move to next slide if at least one of the radio buttons is selected. The other trigger should show a warning (in this example - a layer with a tooltip message) in case none of the radio buttons is selected: 


Step 14: Badge overview

The final overview slide has very easy triggers. You simply need to adjust the states of the avatar and radio buttons based on the variable values created earlier. You will also need to include a reference to the "Name" variable to display learner's name. To save time, you can copy the avatar with all the states from Slide 1.

Objects on Slide 4

First, create the triggers to adjust avatar state when the timeline starts, based on the value of variable AvatarSelected: 


 Again, easy state names become quite handy in here, as you will need to have a trigger for each avatar state. 
You will notice that sometimes avatars take time to change their state at the slide timeline start and as a result for a second you see the wrong avatar. To work around this issue, I try to add a short (less than a second) "Fade" animation to the avatars, so that the course has a bit more time to change their states.
Finally, you will need to create the triggers to adjust the state of radio buttons to either "Selected" or "Disabled" based on the value of the respective variables. For example:


Respectively, you should create a trigger to adjust the radio button state to "Disabled" if the variable value equals to False. Although you can skip this part, I would recommend disabling the buttons to show the users that no changes are possible on this slide and that they really have to go back to make corrections. 

Congratulations, you've created the badge interaction!

Is there anything missing in this tutorial? Do you have questions? Don't hesitate to let me know in the comments.