5 Replies
Michael Hinze

Here is one quick example that shows a counter being set based on correct or incorrect drag-and-drops. Each drag object has two triggers, one that increases the counter when the object is dropped on the correct target; the other decreases the counter when the object is dropped incorrectly. There are lots of variations on this theme, but it might give you some ideas.

Reuben Russell-Furlong


I appreciate that this is a very old thread, but hopefully someone can pick this up.

In the examples provided above, the same problem I am having is being replicated.

When you move the dragable object away from the drop target and move it back, the counter is updated.

I have build a drag and drop interaction where multiple correct items need to be dropped on a single drop target. I have set up a number variable and a trigger to subtract 1 each time one of the correct objects is dropped on my single drop target. However, I don't want the same behaviour in the examples shared above to be replicated, with the counter being updated if one of the correct objects is moved out and then back into the same drop target area.

Is there any way to either lock the dragable items to the drop target when the state of the dragable object is correct? Or perhaps there is another variable I can add so that a dragable object with a drop correct state is only counted the first time the state changes to drop correct?



Walt Hamilton

I suspect that the problem is caused by incrementing the count, rather than counting. I don't know about counting the first drop, but here is a sample that counts correctly. It does that by ignoring moving on and off, and only counts what the final disposition is when Submit is clicked.