Subtraction Game

Apr 16, 2015

Hi Everyone,

Im working on a project where the user can drag and drop all the items from the cart to a basket(drop target). How can i create a trigger or condition when the user clicks the submit button the correct answer (which is only 1 item can be accepted). So if the user dragged 2 or more items the answer will be incorrect. Thanks guys!

 

2 Replies
Trina Rimmer

Hi Kez. This sounds like a job for the number variable! 

Assuming that your goal is to provide feedback on the number of items being selected (vs. the types of items being selected) you can create a Number variable with a default value of 0. You could call that variable Fruit, for instance. Then, for each drag item (bananas in your case) you'd add 1 to the Fruit variable when the learner drops the item on the drop target. 

Then you'd add a Player trigger to evaluate which feedback layer to show - correct or incorrect - based on the total Fruit. So if the goal was for the learner to only have 1 banana in the basket; you'd want the "correct" value to be equal to 1, therefore anything greater than 1 would show the incorrect feedback layer.

To make this a little easier to understand, I've attached a quick example file in Storyline 2.

Let me know if this is along the lines of what you're trying to do or if you need any more help.

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