Forum Discussion

JessicaWaddell-'s avatar
JessicaWaddell-
Community Member
3 years ago

Interactive slide with variables and layers

I've created an interactive slide where the user can drag 2 multimeter leads to test voltage on different wires.  I have a variable set with a total number and depending on where they drag the lead, will add a number to the variable and then a certain layer will show on based on the total.  

The problem is, it keeps showing one layer no matter what they drop it on, even if the variable doesn't change.  I cannot figure out what I am doing wrong!  I have reviewed all of the variables, triggers and layers multiple times and it still won't work.  Trigger is set to show layer when variable changes with condition if the variable total equals a certain number.  Any advice to give?

  • I used a reference to observe the value of MultimeterTotal. It was always correct, so the problem is not likely the objects, hotspots, or triggers that adjust the variable. That leaves just the triggers that show the layers, or the layers themselves. I created a button that showed a layer, and they all tested OK. So I isolated the triggers that show the layers. Since 480 always showed, I started with the triggers that showed it.  When I disabled the rest of them, nothing changed, but when I disabled that one, everything went crazy.

    The principles I follow to trouble shoot:

    1. Something is going wrong, and I WILL find it.

    2. Think it through - what actions can the program take that will cause the results I'm seeing?. (e..g If the variable doesn't change, or changes to the wrong number, this could happen. If the layers are corrupted, this could happen. If the triggers that show the layers are corrupted, this could happen.)

    3. Never say "I've thought of everything" and quit. Test the things you haven't thought of.

    4. Create artificial processes to isolate possibilities (e.g. I added buttons to click that showed the various layers to see if the layers themselves were at fault.)

    5. Most important of all: only make one change at a time then test it.

  • That sounds like an interesting challenge. Is there any chance you can attach the .story file here, so I can take a look at it?

  • There is something wrong with this trigger:

    Delete it and rebuild it from scratch, and I think it will work.

      • MikeGrady's avatar
        MikeGrady
        Community Member
        Jessica Waddell

        Thank you, that worked!

         

        Jessica - would love to see the final project!

    • MikeGrady's avatar
      MikeGrady
      Community Member
      Walt Hamilton

      There is something wrong with this trigger:

      Delete it and rebuild it from scratch, and I think it will work.

      How did you determine that it was this particular trigger?