Change State of Object with Drag&Drop

Oct 01, 2021

Hi all!

I would like to create a game where learners have to prepare food with different ingredients, e.g. Strawberry Milkshake. Therefore I aim to have one drop oject (e.g. the blender) and two drag objects (e.g. milk and strawberries). When milk and strawberries are booth dropped on the blender, the prepared meal (e.g. Strawberry Milkshake) should appear on the tray of the waiter.

I tried to create different states of the tray with the prepared meals and a trigger to change these states when these objects are both dropped on the blender. But in my case it is only poosible to drop one object on the blender - either milk or strawberries.

Can someone help me or has a better solution?

Thank you so much!

3 Replies
Maria Costa-Stienstra

Hi, Tanja.

Thank you for reaching out!

Are you using a freeform Drag and Drop interaction or creating one from scratch?

I'm looking forward to the suggestions you will receive from our talented community members! In the meantime, I wanted to offer an idea using a freeform interaction. In Form View, you can choose the blender as the drop target for both items:

Windows 10 (1) 2021-10-01 at 12.07.12 PM

You can also create a Correct layer that will show the prepared milkshake when the user clicks submit. 

Screen Recording 2021-10-01 at 12.06.46 PM 

If I'm misunderstanding how your scenario is set up, you're welcome to share your .story file here for more specific suggestions.

I hope this helps!

Tanja Albrecht

Hi Maria,

Thank you so much for your tipp with the Freeform Drag and Drop. I tried to do it from scratch.

Can I also have more correct layers for preapring more meals than just the milkshake? I want to explain the multiple clipboard feature on Windows 10 to my learners with getting orders and preparing different meals in a restaurant, but do not know how to connect my 4 prepared meals to the Drag and Drop function.

You can find my .story file attached.

Thank you for your help!

Maria Costa-Stienstra

Hi, Tanja.

Thank you for sharing your .story file!

I'm not sure I fully understand how you want the drag-and-drop to behave. I saw that you have buttons on the right (Streg+C and Win+V), and it seems like you want the layers with the completed food items to appear when Win+V is clicked, depending on how many times they pressed Streg+C. 

If that's correct, then you can add triggers that check the variable StrgCClick:

Windows 10 (1) 2021-10-20 at 9.44.33 AM

However, you will likely need a way to "clear" the variable if the users change their minds or after the first time they click Win+V. For example:

  • Set variable StrgCClick to 0 when the user clicks Win+V

As for the Drag-and-Drop interaction, how do you want it to relate to the buttons on the right?