Trigger for when all items have been dropped?
Oct 07, 2016
Hi
I have a couple of drag'n'drop interactions, where I'd like to indicate visually when all objects have been placed (correctly or not). I'm trying to do this with triggers on the drop targets, but have the problem that when an object is moved from one drop target to another, I get too many variable increases, and the visual effect can therefore be triggered before all drop objects have been placed, which is sortof self-defeating when you want to indicate "You're good to SUBMIT".
I've looked for trigger options where I can count down if an object is removed from a target, or other ways to keep track of having all objects placed, but have not found a solution.
Has anyone else found a way to do this?
14 Replies
Hi Henrik
can you upload your slide - might be easier for someone to help if they can work with your existing setup
Updated with an image.
I want the large blue box (and its headline "Drag stakeholders from here" to disappear when it's empty, all six items nicely placed in the landscape (correctly or not).
It's hard to say without seeing the triggers Henrik can you upload just that slide from Storyline
Fair enough - I didn't expect anyone to delve this deep into the tech details :)
The slide is here. While the triggers may seem a bit complicated at first glance, it really isn't:
- Add to a variable whenever an object is dropped.
- Set some elements to Hidden when the variable reaches the number of elements.
So the core problem is to detect that all objects have been dropped on some target, and take some action when that is reached.
Ok, I have changed the trigger so that the blue box doesn't hide until the user clicks submit on condition that variable > = 6.
I put the variable reference on the slide and also an outline around the drop targets just for testing.
See if this works for you.
Well, that was a step in the wrong direction..:
I want the blue box (and the headline) to vanish when the user should press the SUBMIT button, not when he does so.
I'm including another screenshot illustrating the problem. Here, the user has changed his mind a couple of times, increasing the drop count to 6 before all items have been placed. That would cause the blue box to vanish prematurely if the user is insecure about the solution and moves objects to other drop targets than his first choice.
I hope this makes it clear?
See if this works for you
I achieved this with a combination of Variables and Triggers:
1: Add a "true/false" variable for each stakeholder set to false
2: Add a Trigger to each stakeholder changing its variable to true when dragging over the landscape
3: Add a Trigger to the blue box deactivating it when something else ist clicked and all variables are true.
See Attachment for more Details :-)
Have fun,
Jens
It does - thanks a lot!
Interestingly, you have implemented a new approach to keeping track of the drops, explicitly making sure that each drag object has been dropped somewhere.
This also means that I can do away with testing my variable for >= 6 - but I still need to increase it at appropriate points in order to trigger the "Hide objects" Trigger. Interesting :)
Glad that will work for you Henrik...good luck with your project!
Thanks, Jens - this is the way to do it.
The 'something else' part can be tricky, BTW. A trigger on MouseUp events would be the most obvious way to do it, but this trigger does not exist.
You're always welcome to share your thoughts on a "mouseup" trigger in the form of a feature request.
Thanks for reminding me, Ashley. Doin' that :)
Super helpful for our developer, Henrik. Thanks!
This discussion is closed. You can start a new discussion or contact Articulate Support.