Interactive slide with variables and layers

Sep 29, 2022

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?

8 Replies
Walt Hamilton

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.