Drag & Drop Question (Another One)

Nov 05, 2015

I'm new to Storyline 2, but have had previous experience with other authoring software’s. What I'm trying to create is a drag and drop with images. The 2 images in the exercise that I’m having trouble with are the “shaft” and “stack”. These two images when dropped on the same area are supposed to show them together layer (stackandshaft). I’ve created a variable (ShowingShaftandStack) that when equals to 4, shows layer (stackandshaft). It works fine when dropping them into place on the first try, but what I’m having trouble is on multiple selections of the two items. When removing the “shaft”, the layer (stackandshaft) should hide and only show the “stack”. It should reset the variable so that the learner can try multiple times to get it right. I’ve added the .story file to get a better understanding of what’s going on. Please help!

13 Replies
Daniel Sposato (Philly)

You might want to consider using the "object dropped on" function on the objects when you take them apart. You could make the entire background a large rectangle on the lowest layer and have additional objects under the initial drag objects for the return spots. This way you could tell what slide layer to show when you want then to depending on what is dropped on the background or dropped on the additional objects under the initial drag objects. Hope that helps.

Ben Marshall

Daniel,

I made progress with your suggestion, but still having problems.

I added a hidden rectangle under both of the images "shaft" and "stack". When I took them apart and dropped them on the rectangles using the "object dropped on", it worked and reset the variable. But, if I didn't drop it directly on the rectangle, it wouldn't. If I kept dropping the "shaft" onto the hot spot where it's supposed to go, the variable keeps counting higher. The end state is that by it doing this, it shows a layer (ShowStaffandStack) I don't want it to until both are dropped on the hot spots.

Daniel Sposato (Philly)

Try making a separate variable for the 2 parts (stack and shaft). Then when both equal to 1 you can tell it to show that slide layer. Then tell it to show either shaft or stack if one of those 2 variables are equal to one but not the other. And don't attach these triggers to the objects, just make triggers that look for those variables to be equal to 1.

Hope that makes sense and helps.

Ben Marshall

Trying to make sense...this is what I did...I made the separate variables (shaftVar and stackVar) assigned them a default value of 1. Made a slide trigger that said show (stackandshaft) layer, when shaftVar changes, if shaftVar is equal to 3 and stackVar is equal to 3. For the stack trigger I had it set stackVar equal to 3, when the user drops a shape on the HotSpot. For the shaft trigger I had it set shaftVar equal to 3, when the user drops a shape on the HosSpot.  I believe this was what you were getting at. If it isn't, please clarify, because I'm going crazy here...:)

The layer (stackandshaft) shows up fine. Its when I go to select the separate images (stack or shaft) to break them apart is where the issues start coming. The layer (stackandshaft) doesn't hide correctly. If I put a trigger to "hide" anything, the layer never shows up at all...it somehow overrides all other triggers.

Again, thanks for the help. It is appreciated very much.

Daniel Sposato (Philly)

Got it to work! It's attached. One issue is that the slide layer with both the shaft and stack is overlapping. I indicated that on the layer in the example I sent. What I would also suggest is making some kind of indication to drag them apart. It doesn't have to be like the one I did but it could be. But let me know if this achieves all of what you were trying to do.

Daniel Sposato (Philly)

Looks good! However I noticed something (and it's something I screwed up on in the version I gave you). The reset button doesn't reset the variables. I put 2 triggers on it that say add 0 instead of set equal to 0. I meant to tell them set equal to 0 and not sure how I missed that. Here's a screen capture of the triggers I fixed:

Easy fix!

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