Help needed! Building a counter that adds and substracts "automatically". Storyline 2

May 20, 2015

Dear community,

I hope, somebody out there has got some advice for me. Here is what I've done so far:

1. I created an interactive slider that has a range from 0 - 100.

The user can drag the slider in "1" steps.

2. Created a number variable (Start value: 0).

3. Created a Trigger that Adds "Value 1" to the number variable each time the variable of the slider changes.

4. Inserted a Text Box with a Reference to my number variable --> In this way, I have a "counter" from 0 - 100.

Please see Screenshot 1.

5. Created a second number variable.

6. Created a Trigger that Subtracts  "Value 1 " to the second number variable each time the variable of the slider changes. 

7. When the slider value is equal to 100, number  variable 1 changes its state to Hidden; the same applies to number variable 2 when the slider values is equal to 0.

Please see Screenshot 2.

This way works pretty well if the user does not changes the direction of the slider. What does that mean? For example: The user has dragged the slider to Step 50 --> Number variable 1 shows "50". When the user now moves the slider to the opposite direction, e.g. to Step 30, number variable 1 shows "70". 

Please screenshot 3

 

This is the point, where I don't knwo how to solve the whole thing. I hope anyone can help out presuming that you understood what I wrote here:)

Many thanks in advance

René

 

 

8 Replies
Amanda Lodge

Thanks! That helps! 

It seems to be working properly for me. When I drag the first slider backward or forward, the Slider1 variable shows the number step that the slider is on. When it reaches 100 it changes to hidden. Then when I move Slider 2 backward or forward it also shows the number step that the slider is on. I don't see the trigger you mentioned about "Created a Trigger that Subtracts "Value 1 " to the second number variable each time the variable of the slider changes.". I attached a quick screen recording showing how it's behaving for me. 

Should it be doing something different? 

René Müller

Good morning everyone, 

 

WOW! I am very thankful that you answered so quickly here. 

@Jackson: Tanks for providing the .story-file. I had a llok at it, and it seems to be exactly, what I need. It didn't come to my mind that I could simply insert reference for slider variable. I will try to implement your approach into my project, I'm pretty sure that it should do the job! 

I keep you guys updated on this. 

And again: Many thanks to all of you!

 

Regards

 

René 

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