Challenging custom Drag and Drop interaction

Apr 25, 2017

I am building a custom drag and drop interaction for an onboarding course and can't figure out how to solve the following challenge.

Here's what I want learners to be able to do:

  • When they click each object (see picture or story file), a corresponding attribute should appear above the red line (ex: "takes initiative", "direct and specific").  
  • When they drag the object from its place to the backpack, the attribute should either remain at its place or disappear. 

 My question is: How do I make those attributes appear and disappear when different objects are clicked? If I add them to the selected states, then when the object is dragged over they will also be dragged over. If I trigger them to show up when object is clicked, then if you go back after clicking other objects and click the same object again, the attributes will not show up anymore.

Let me know if any of you knows how to deal with this.

Thanks!

Lili

 

8 Replies
Nejc Žorga Dulmin

Hmm, okay, here's my thinking.

  • I would create the attribute text as different states of one object
  • Initial state of the attribute text box is hidden
  • You change the attribute text box state with each click on the different objects
  • After you drag an object to the backpack I assume that that object state changes to hidden, which means you can add the following trigger once that happens: Change the state of "Attribute text box" to Hidden when State of Object X = hidden.

I think this should work. :)

Allison LaMotte

Hi Liliana,

I just had a look at your file. Here's what I recommend:

  1. Put the attributes for each object in the selected state. This will allow you to bypass the extra trigger you added to make them appear when the object is selected.
  2. Select all the objects and add them to the same button set. This will make it so only one of them can be selected at once. That way, when you click on a new one, the one that was previously selected will automatically become unselected.
  3. Use the drag correct and drag incorrect states of the objects to make the attributes disappear or stay on the screen.

Here are a couple articles you may find useful:

Hope that helps! Let me know if you're still having trouble.

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