I have a variation on a drag-and-drop quiz with a bit of a twist and I'm having trouble finding a solution.
I have 4 drag objects on the left that have to be dragged 3 separate times each to 3 different cells in a table - the drag and drop objects have all been created and named in CP. Any idea on setting this up? Is it possible?
Sorry but I don't understand what you mean exactly.
'3 separate times': can you elaborate? What needs to be done in ONE attempt?
There are 4 objects on the left - each object has to be dragged 3 times to 3 different cells in the table. So the challenge is the fact that the object has to be repeatedly dropped to different targets for success.
Thanks for your reply.
I am trying to create an example project for you, because I am not sure that my intuition will lead to the wanted result.
You can use object actions, but it will be rather complicated at least if I understand you correctly: you want all the targets to be filled for an answer, which means that you could need to have 3 stacked drag sources to the left.
If you want to know more about all the possible actions in the D&D interaction, have a look at my blog post:
I may have understood not correctly what you want? Is it OK to drag the same drag source first to one target, to move it later on to another target? Or do you want to keep a dragged source in the first target as well? I was planning to check out the second situation, and it feels like StagPrime is thinking about the first situation.
I would use some variables and the Object Actions panel to work out the logic for each movement of the draggable.
Be sure to select that you can redrag the dropped source
Thanks for your reply, I can't find any object properties that define object containment in order to take this approach.
You'll need to select the drop target(s) a
nd look at the format section.
Thanks very much
I'm sorry I will need a comprehensive explanation of the entire procedure. I appreciate you sharing this.
Lilybiri is right - I was thinking about the scenario of moving the same draggable to multiple locations.
I am thinking 12 variables - one for each drop target - let's assume a spreadsheet style naming convention.
a1, b1, c1, a2, b2... and so on.
Using the object actions panel - we assgn a 1 to the variable for that cell if the correct block is placed there and a 0 to the variable for that cell if the wrong one is placed there.
I set the accept condition as Replace so that if an object is dropped on top of another - only the most recent one is allowed to remain. One drag object per drop target at a time.
Rinse and repeat for all drop targets.
If the learner has done all correctly - then all the variables would have a value of 1.
You can then do a check for this upon submit.
Hopefully that is a little more clear.
Is there a 'contains' property in the Advanced actions where I can detect that one object is within another to trigger the value change?
No, contain is only meant to find a sequence of numbers/characters within a string or a number. It cannot be used for what you mean here.
You didn't answer what I asked before: is it the scenario used by StagPrime or my scenarion that is wanted for? I wouldn't spend more time if I am heading the wrong way.
I have an example ready, using only D&D's functionality (types) and stacked drag sources. Works perfectly. No need for variables nor object actions. But it may not be what you really want....
Check it out under this link:
I used colors to make it clear which drag sources need to be in the targets. You have 3 attempts on this level.