gfxfx
June 25, 2017 14:35:23
random number in a switch
i would like pick a random number from 0 - 3 from a switch please see picture
sepu
June 25, 2017 14:49:40
what are you trying to do ? copy different geo into points?
gfxfx
June 25, 2017 15:31:26
I select a random integer from 0 - 3 so switch picks 1 of 4 sphere or tube or torus or box
tamte
June 25, 2017 17:54:21
random number based on what?
let's say for now that you want random number every frame
floor(rand($F)*opninputs("."))
Callmedude88
March 27, 2018 15:43:23
I'm new to houdini and expressions in general, but found this formula to work for one of my switches…
round(rand($F* 0.1)*3)
… if you have more than 4 switch connection, say you have 15, then you could change the formula to this…
round(rand($F* 0.1)*14)
This expression allows for random whole numbers from 0 to 14. A total of 15.
Cheers?