Issue with capturing data from a slider

Mar 31, 2023

Hello, my interaction is supposed to work in the following way:

  1. slides the slider to correct bit (with the number percentage changing accordingly alongside)
  2. writes text in the box
  3. this continues until the last slide, where the results are displayed

I know it is a very simple interaction, but I have a small bug: the data from the slider is not being captured.

It is working in P3 (click to see), but not E2 (click to see) (and a few other ones I have that I've not uploaded, that need fixed), and I can't see what the different between them is, so I can also fix the rest.  Maybe I've been looking too hard and can't see the wood for the trees!

I have attached the SL file, with both the scenes in there, along with the review links above. Thanks in advance for help.

5 Replies
Walt Hamilton

This trigger (and all the ones like it) has confused me, SL, and I'm sure you. You need to give sliders and variables different names. I recommend something like Slide X and SliderX Variable  at the very least. Much better is to name the variable to reflect the data they actually contain, like powerImportancePercentage. Good names prevent the confusion that exists in triggers like this:

Which Slider58 is being set to which Slider58?

Click on the first Slider58, and you will see that it refers to a project variable. Click on the second, and you will see that it refers to the same project variable, essentially setting this variable to what it already is.

 

This variable is set to itself when the slider loses focus, but isn't connected in any way to the slider.

Variables and sliders work together without triggers from you. When the slider moves, the attached variable changes. You can tell what variable is attached by selecting the slider, clicking Design and looking for the Variable box.  If you slide the slider, the variable changes. If a trigger changes the variable, the slider moves to match it.  You probably don't need any of those triggers.