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
Henrik Clausen

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.

Henrik Clausen

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?

Jens Giesekus

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

Henrik Clausen

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 :)

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