Automatically Run Number Slider

Hello, I was wondering if there is a way for a slider to change when a value from a value list component somewhere else in the script is changed? Specifically, I want the slider to run from 0-9 when the value from the value list is changed. I have seen a couple of examples in the forum although they work quite differently.

Thank you in advance.

example.gh (69.4 KB)

“trigger” component does the job

1 Like

If you mean everytime the slider animated from 0 to 9 why you use different list item?
or every list item used to change a domain for example 0 to 3 than 3 to 6 …?


You can use smooth numbers

count.gh (4.6 KB)

2 Likes

It is unclear to me why would you want that. You can just remap numbers

1 Like

You could script the slider to increment. This example should get you going (I see you know GHPython):

You could also write a counter like this one. Which might be simpler:

2 Likes

Thank you Anders for your help!

The second option was closer to what I was looking for. I have also combined that with one of your scripts (How to detect an update/change of a number? - #4 by kaspar-ehrhardt) that I found in the forum and now it works perfectly!

Again thank you for your effort and your time!

example.gh (74.2 KB)

1 Like