Counter for drag and drop?

Aug 25, 2014

Is it possible to add a counter to a drag and drop activity so that, with each correct drop, the counter increments? I have reviewed the counter tutorial (nice), but I am not sure how to apply to drag and drop (tutorial demonstrates counter incrementing when user clicks a button).

Thank you!

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

Hello,

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?

Thanks,

Reuben

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