Forum Discussion
Resetting a Drag and Drop
Hi there,
I have a drag and drop interaction that I need to reset when they click my Try Again button. I can reset the states of the drop images but can't seem to find where I can set the drag images back to their starting points.
Any hints is much appreciated!!
34 Replies
Glad that this thread was able to assist you as well Susan! Thanks for popping in to mention that :)
- VictoriaSublettCommunity Member
Thanks Rebecca for the cool drag and drop interaction screencast(3 years ago). I have tried it and it almost works, but I don't get the Incorrect layer - it jumps to the page the Incorrect layer jumps to without stopping at the Incorrect layer. I have attached it. Does anyone know what I'm doing wrong?
- rexmorCommunity Member
Hi Victoria,
Change the initial value of tryagain variable to 0, change the condition of tryagain to greater than or equal to two.
(see screen below)- VictoriaSublettCommunity Member
Wow Rex! It worked!!
Why didn't it work when I did the variable as 1 and then add 3?
- VictoriaSublettCommunity Member
Thank you very much, Rex!
- rexmorCommunity Member
Hi Victoria,
Why your method doesn't work because of your trigger condition.
You need 4 attempts to get the condition to true.Here's the logic.
dafault value: tryagain = 1
first attempt: tryagain = 1 (not equal to 4) because the Increment is after the condition
second attempt: tryagain = 2 (not equal to 4)third attempt: tryagain = 3 (not equal to 4)
fourth attempt: tryagain = 4 (TRUE, tryagain is equal to 4)
- VictoriaSublettCommunity Member
I thought I went beyond 4 tries, but maybe I didn't. Thank you again, Rex!
Love the teamwork here :) Glad you found value in this older thread Victoria and that Rex was able to pop in and assist with your questions.
- StephanieLongCommunity Member
Does this still work if the user is allowed two attempts to get it right?
- StephanieLongCommunity Member
Sorry I mean if you set the slide to reset to initial state doesn't that give the learner unlimited attempts?
Hi Stephanie,
Yes, if you set the slide to "reset to initial state" that would give the learner unlimited attempts. But that's where the numeric variable comes in! You can use the numeric variable to track how many attempts the learner has already used.
Check out Becky's video to see exactly how to use that numeric variable to limit learners to 2 attempts.
Related Content
- 8 months ago