Forum Discussion
Snap back ALL dropped items to original point
Hello all,
I have a drag and drop interaction where I would like the user to be able to drop various items to a single target. I would like each drag and drop to result in showing a layer, and in all cases, I'd like the dropped item to snap back to its original location, NOT the target.
In drag and drop options, there is the choice to "Return item to start point if dropped outside..." but I want it to return item to start point always, and so far I haven't figured out how to do this. Any ideas?
Here's an example with download
https://community.articulate.com/download/storyline-360-reset-drag-and-drop-incorrect-choices
- AndrewHanleyCommunity Member
There is indeed!
A while back, our very own hero Judy Nollet came up with an excellent solution using motion paths.
If you create a motion path for each of your dragged items, with the start point of the path at the starting origin of the item, then whenever you want to reset its position you simply use the trigger MOVE <drag item name> on <MOtion path name>
NOTE: ensure the motion path is 0 pixels long (ie start and end points are in the same place)
I'll try to find Judy's original post and link it here after.
- AndrewHanleyCommunity Member
Hi Rachel. No problems.
Just set the slide properties to "RESET TO INITIAL STATE" and then whenever an item is dropped, have two triggers.
The first says JUMP TO SLIDE THIS SLIDE; and the second is SHOW LAYER <layer name>
So you are reseting the slide then showing the appropriate layer for whatever they dropped.
I think that should work well.
- RachelHedgepethCommunity Member
Thanks, Andrew! If I want to avoid jumping to a slide, because there are some state changes that I want to preserve, is there another solution?
David shows this tip, essentially you use a motion path that is 0 pixels and when you want to reset the object, you need a trigger to move the object on that motion path.
- RachelHedgepethCommunity Member
This is the exact solution I needed! Wonderfully simple too. Thank you Andrew and Tom!