Hello
how can create a random number slider?
Hello
how can create a random number slider?
Difficult to understand what you want.
Please look at the changes in this slider; it is completely organized.
What I need is a slider that generates random numbers when it is moved, and this randomness must be produced directly by the slider itself.
Is it possible to generate random numbers by sliding it?
And the output must come directly from the slider.
no, and I don’t understand why this is so important
Not on my PC but if you can put an equation inside slider and if rand is there you can use it. Default rand use time so it is random
As @laurent_delrieu pointed, you could create a simple pseudo-random algorithm with the aid of the available functions, and use that inside the slider’s Expression editor.
Pseudo-random slider.gh (4.1 KB)
Why?
I’m sure it’s possible, but would likely require tracking mouse button states/events etc. (i.e. quite complicated). A simpler solution could be to randomise the slider value on a button click (i.e. similar to how the genepool has a randomise function). Something like this, maybe:
Just remembered this low level Windows hack. Again, not sure if this makes any sense to your problem, but it certainly seems to work (i.e. it generates/sets a random value when manipulating the slider gripper):