I recently was given a storyboard which had a drag and drop Storyline interaction where the answers “two” and “three” could go in either order. Meaning it could read either:
“Nam luctus at ligula __two__ porttitor donec mauris sapien __three__, commodo.”
“Nam luctus at ligula __ three __ porttitor donec mauris sapien __two__ , commodo.”
The problem with Storyline’s default drag and drop is that, although you can have multiple Drop Targets that can accept more than 1 Drag Item, you cannot have a Drag Item that can go into two different Drop Targets. See screenshot below.
So what can we do? What are our options? We could revise the question so that it’s not an issue. This isn’t a bad idea, actually. Some times you need to go back to the drawing board. Or, if you’re really bent on making it work, you can just create a work around. And here’s how I did it.
Setting Up the Slide
Make sure this slide does not have a next button but does have a submit button by navigating over to the gear on the bottom right of the Slide Layer pallet.
Refer to this screenshot:
Now, let’s add some variables. This is knowledge check 3 and it has five options. I need to know if the Drag Item is in the right place, the wrong place, or not dropped on anything. So, I created these 5 text variables: KC3_1, KC3_2, KC3_3, KC3_4 and KC3_5.
Create three triggers on each Drag Item. These triggers will adjust the corresponding variable.
The first trigger will adjust the variable to correct when the Drag Item is dropped on the correct Drop Target(s).
The second trigger will adjust the variable to incorrect when the Drag Item is dropped into an incorrect Drop Target.
The third trigger will adjust to (blank) when the Drag Item is dragged over a shape that I placed in the background called “blank it” (pun intended).
Do this for all five drop items. Keep in mind Drag Items 2 and 3 can go into Drop Target 2 or Drop Target 3, as shown in the screenshots above.
Make Sure Each Drop Tone is Set Up Correctly
Right click on each Drop Target and make sure “Snap to center” is selected. It’s the default. But if you want to change it, this is where you would do so.
Create the Correct and Incorrect Layers
Create two more triggers, one for each layer of what to show when. We have our Submit button in the player, so let’s use that. When the learner clicks Submit, and all five Drop Targets are correct, show the correct layer. Refer to this screenshot:
When the learner clicks Submit, and any of them are not correct, show the Wrong layer. By using text variables, this means if they still have items that aren’t put into a drop zone, it’s looking at that too. It’s looking to see if they are not correct, which wrong and blank are. Refer to this screenshot:
Debugging and Caveats
As always, make sure you create a way to debug if you are having problems. I usually create a textbox with the variable names inserted. I will be able to see if it’s correct, wrong or blank. I always name it something like HIDE DEBUGGER. So, I know to make sure it’s hidden before published.
So, although we gained the ability to add a Drop Item into two different Drop Targets, there is a caveat. In a drag and drop slide, you have an option to “Allow only one item in each drop target.” You lose that ability here. I have tried to disable the Drop Target and Drop Item if it’s correct, or make the Drop Targets big enough to hold two. Neither of those ideas seemed ideal for what I was trying to accomplish, but may work for your situation.
So, if it’s not important that the Drop Target kicks out an extra Drop Item, this method is perfect and scalable. If it is absolutely mandatory, I would consider re-working the question and go with the native drag and drop feature built into Storyline.
I have attached the file so you can play with it and dissect it.
What cool things have you done with drag and drop Storyline interactions? Let us know in the comments below!