Reset Drag and Drop WITHOUT Resetting Attempts

I have a drag and drop quizzing slide in my project. Students get three attempts. I want the drag and drop slide to reset to its initial state (so the drag and drop items return to their word bank) after each incorrect attempt. I added the trigger "jump to this slide" to my Try Again layer and set up the base layer to "return to initial state" when revisited. While this resets the drag and drop items, it also reset the student's number of attempts--I don't want the student's number of attempts to reset. I've tried working with the variables on my Try Again slide, but variables are my weak point in Storyline. Help! 

2 Replies
Walt Hamilton

I'll take a look at your project. in the mean time, here's something that may help you get a better handle on variables.

I got home last night, and the cat insisted he had not been fed all day, and was STARVING. I hadn't been there all day, so I didn't know, and my wife was off to her quilting party, so I couldn't ask her. Fortunately, she left a note on the counter that said "I fed the cat", so I knew not to feed him again.
The note she left me is the variable. I couldn't see her feed the cat, but I could see the note and know what went on while I was gone. Storyline is just like I was. One slide has no way of knowing what happens on another slide, but it can read a message left for it in a variable, and know what the learner did on another slide, provided you, the developer used those actions on that other slide to change the contents of a variable.
The cat got pretty insistent, so I gave him a snack, crossed out her message, and wrote, "He's also had a bedtime snack", and went to my meeting.
The note is the variable. Everybody can see it, and it never changes unless you, the author, create a trigger to change it.
My wife is getting older (I'm not, just she), and takes a bunch of medicines. She puts them in one of those little plastic gadgets with seven boxes. Every night, (if she remembers :) ) she looks in the box for that day. If it is empty, she knows she has taken her pills that day.
The pill box is the variable. She can't always remember everything, but if the box has pills in it, she knows to take them. 
Variables are designed to be seen everywhere, but not heard (much like small children of a previous generation).  SL cannot multi-task, so only one slide at a time can be active. SL has no memory, so when a slide  becomes active, it can't know what went on while it was hibernating. That's why variables were invented.  Each slide can look at the note (variable) and by seeing what is on there now, it can know what went on somewhere else, or some other time. I couldn't hear my wife write the note, but I can read it and know what went on at home while I was not there.
Walt Hamilton

A couple of things.

You were on the right track with your variables, except for these triggers:

Once you jump to a slide, it interrupts the execution of triggers. All the triggers below the jump are cut off, and none of them execute. So this variable is never changed. Move it above the jump trigger, and it will work.

Even if it does work, there is a still a problem. As you noticed, jumping to the slide resets the built-in number of attempts. you can use your variable to keep track of the attempts, and show the appropriate layer, but it won't grade and track the results . Using the Submit trigger depends on the number of attempts variable, and using your variable ( which would require more triggers to show the correct layer), doesn't track. So the only tracking you would get would be when they get it correct.

In the attached sample, I used 0 - length motion paths to return the drag objects to their original places, which allows you to just hide the try again layer, and use the built-in magic for tracking.


Just a simple FYI, you don't need this trigger:

In the layer properties, there is a setting for each layer to hide other layers when it shows, and by default, it is set to On.