Help with Triggers/Variables to show a slide layer

Jan 17, 2020

I'm relatively new to SL and I'm trying to get the hang of triggers and variables. I've created a simple, 2-slide interaction, in which the user will select items on the first slide to populate as 'score' on the second slide. My variables and triggers work up to that point. When the user moves to the second slide, I'd like the layer shown to be dependent on the score from the first slide. I've attached my file. I'm sure this is a fairly simple thing that has an easy fix, but I'm still learning and so I'd love some help!

2 Replies
Walt Hamilton

To answer your question, on the second slide, the "when totalscore changes" part of the trigger doesn't work, because when a variable changes, it broadcasts that action only to the slide that changes it. Since it changes on slide one, Slide two never hears it change. Put the layer triggers on the base of the Results slide and write them like "Show layer Score2orLess when timeline starts on this slide if totalscore is between 0 and 2." You need one for each layer.

Some other observations that may make life easier for you.

Adding to and subtracting from a value when a user clicks seems intuitive, but is fraught with problems. If they click on something twice, your count is off. I see that you have set up variables and triggers to prevent that, and they look like they will work. Let me suggest a method that might be easier, and puts all the triggers in one spot. Add them to the next button. You only need one trigger for each clickable. Subtract from the total depending on the state of clickable. "Subtract 1 from totalscore when the user clicks Next if state of feedback is Visited"  Then add a final trigger to  jump to the next slide. It's very reliable in terms of accuracy.

As to the states of the questions, this is a visual medium, so nothing has to do what you want it to do. It only has to look like it does. By that I mean that you don't have to remove the questions once they are answered. The colored box can cover them up, and they will disappear. It's no big deal, but not having to move them off the stage can save you a little time.

This one is a bigger deal. I would use the built-in state "Visited". If an object has a state called "Visited", when it is clicked, it changes to "Visited", without the need of a state-changing trigger. That can save you a lot of time and headaches.

A couple of design thoughts. If you are using the variables later in the course for something else, then you need to set them when the user clicks. If their only function is to prevent multiple clicks, they aren't needed. Put the calculation of the total on the Next button, and it is only calculated once, no matter how many times they click. Clicking again on an object that is already in the "Visited" state doesn't change anything so they can click forever without any damage.

If I were designing it, I would wonder about someone that clicks something, then thinks "Oh, no, that was the wrong one." You may have reasons for allowing only one chance. Even if you don't, you owe it to yourself to learn about the "Selected" state. It is the greatest thing since pockets on shirts. When an object with a "Selected" state is clicked, it changes to "Selected". If it is clicked again, it returns to its initial state, all without any triggers. You can check it like any other state, (if state is Selected) and it toggles back and forth. You could use it to give users a second chance, but if you don't want to, you will thank yourself hundreds of times for learning to use it.

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