Do drag targets have "States"?

Sep 09, 2015

Question:

Does the drag target (not the drag object) have a state?

Situation:

6 dragable items

2 targets

1 correct drag item for each target

Rather than use the submit button on each question, I want the user to be able to select an answer for each question and then submit everything at the end. This is easy enough to do with multiple choice questions because I can test for "selected".

There does not seem to be a similar easy to define "state" of drag targets.

For example, I would want to show "Invalid answer" if both drag targets == false.

Any ideas how to do this?

- Would I have to test for 6 (draggable objects) x 3 conditions (drag over, drop correct or drop incorrect)? Checking for 18 conditions is not appealing.  

I wish there were a text editor for the trigger scripts--it is cumbersome doing all this scripting through the GUI. 

- Michael 

14 Replies
Daniel Sposato (Philly)

You could set the correct/incorrect drags to set a variable = to 0, 1, 2 or 3 depending on what they move to the drop zones. This can be done through the use of conditions on triggers. Then just have messages on slide layers indicating 1 of the 4 possibilities according to what the variable equals:

1) both are wrong

2) both are right

3) 1st drop is right

4) 2nd drop is right

Michael Maier

Thanks Daniel. I'm having a hard envisioning what you've described.

Var = QuestionStatus

What condition(s) am I checking for?

The conditions only apply to the drag objects not the drop targets. Maybe I only have to test for one condition--"Both are right" otherwise it's wrong.

In that why I could just test for the Drop.Correct state for the 2 drop objects.

I need to think about this some more.

 

Daniel Sposato (Philly)

Hey Michael, I made a quick example to clarify what I think you're trying to accomplish. And it actually changed a bit from my first idea as I think I understand you better now.

D&D example 

Attached is this example and I think it accomplishes what you're looking to do. This is a Free form Drag and drop with added triggers for the specific conditions. The actions necessary for this actually were very minimal as you will see in the next image.

Actions

This is all I put on the base layer and actions are even more minimal on the slide layers for correct and incorrect messages. When the user clicks the continue button on the incorrect slide layer it reloads the slide. This is the easiest way to reset a drag and drop to give the user another try.

If you want the user only to try the slide a certain amount of times just use a variable with a trigger to add one to a variable. Then use another trigger to show a new slide layer once the variable reaches a desired value. That new slide layer instructs the user to skip to the next slide or whatever you wish.

Let me know if this is what you were trying to accomplish.

Daniel Sposato (Philly)

Hey Phil, the correct/incorrect states could have been used in this D&D as well. And there's no particular reason I didn't use them. The only main advantage to using a slide layer over those automatic states is that you can animate on slide layers. The only way to animate on a state is with an animated GIF and that will loop indefinitely.

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