If Variable

Jul 02, 2019

Hi Guys,

I am trying to build an if variable but drawing a blank. I am using Storyline360 and built a drag and drop where if the image is dropped onto the right circle, a lightbox appears, however, I want it so that when the wrong image is dropped into that circle, the try again layer comes on but I am not having much luck.

I also want it where when all images are dropped into the correct circles, then the correct layer would show after the user has closed the last lightbox that appears.

Here is a link to my project. Its the drag and drop slide.

Thank you for any help.



4 Replies

I updated your file for ONLY the "Demonstration" object for you to use as an example.  Here is what I did.

  1. Add a numeric variable called "Demonstration" with a default value of 1.
  2. Added a trigger to set the value of the demonstration variable equal to 0 when the object is dropped on the right target.
  3. Added a trigger to add 1 to the value of the demonstration variable when the object is dropped on ANY WRONG target.
  4. Changed the trigger of your lightbox slide to appear WHEN the demonstration variable changes IF the variable is less than 1.
  5. Added a trigger to show the Try Again layer when the demonstration variable changes IF the variable is greater than OR equal to 1.

Essentially, the drop action when incorrect keeps adjusting upwards and each adjustment (change) triggers the try again later to show.  Dropping on the right target adjusts the variable to 0 which is the only condition that will trigger the lightbox.  

Sally Diab

Thank you Owen for your help, I appreciate you taking the time to work on this for me. Unfortunatly it still does not work. I wanted the try again layer to show when the wrong image is dropped on the wrong circle and for it to show immediately, not only when the user hits submit. 

If there is no other way, I may be fine with them getting the try again! when they hit submit which means they would need to do it again and eventually drop the right image in the right place and thus ensuring that they get the lightbox explanation to read.

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