Slider Position Issue


This is my first post here, I hope I am in the right place! I have a question about manipulating slider positions. I would like my end users to be able to use a slider or click icons to reveal different layers. Here is a picture, and I also attached a .story file for reference.

Everything works okay functionally (layers show when they are supposed to) however if the user clicks the icons instead of using the slider, the slider thumb doesn't change its position. So you can click on icon #8 and the slider thumb stays at position 1. Here is psuedocode of what I would like to do:

if(icon2 == selected)                                      if(icon3 == selected)

{                                                                         {

     sliderPosition = 2;                                                sliderPosition = 3;

}                                                                          }


I don't see a way to perform if statements unless they are conditional, unless I'm missing something. I would also like to find out what Storyline calls their slider variable so I can use it in JavaScript. Any help is greatly appreciated!



4 Replies
Allison Goldthorpe

Hi Luke,

To get the buttons to work the same way as the slider, you'll need to set up triggers to change the slider's variable value. It would be "Adjust variable Slider1 =Assignment Value 1 when user clicks on Folded Corner 1". Then you'd want the layers to be dependent on the variable. Those triggers would look like "Show Layer X when variable Slider1 changes Slider1 equal to X".


Luke Sochacki

Wow, what a powerful way to use the slider, thank you! I have been on a mission to make my courses more interactive, and I am in the process of learning Construct 2 for games and things like that. All these examples are great, I have been lurking here long enough and it was time to make an account. Thank you for your guidance, what a great first post experience!