Adding value to a variable on drop

Hi everyone,

I have created a slide with a question type drag and drop. And in that question there is one drop place and I have to add a certain value to a variable on drop of every object(like total value).

Remember each object has it's own value.

Please suggest if any solution is out there.

Thanks.

Discussion (2)

Hi,

you can add an action to the drag item:

On: Click

Action: Modify variable

Target: Your_variable

Value: Your_value

Delay: 0.5 sec

The action is run on release of the mouse button. The delay is needed to ensure that the dragitem is in place on the dropzone, it make take a short while until the item is "snapped" to the dropzone, if the user drops it near the edge of the zone. The delay should be longer if your dropzone is bigger, it may be shorter for smaller dropzones or if you have "Snap Drag Items to Center of Drop Zones" unchecked.

Add a condition to ensure the user hasn't dropped the item outside the dropzone or just clicks on an item at its starting position:

Only if "Question_0001" (your question variable) "Does not contain" "1-(na)" for the first drag item "2-(na)" for the second, etc. Before the condition can be true, the drag item must be in place on the drop zone, so again: the delay is important.

Tim

Thanks Tim. It works fine. :)

Discussions have been disabled for this post