Using custom channel on wrangle to randomize switch

   936   2   1
User Avatar
Member
660 posts
Joined: 8月 2013
Offline
Hi all.

I think I am missing something here. I am trying to use my “switch_seed” value to act as a randomizer for my switch, so I can manually alter the seed and get the switch to select another object. I know I also need to minus 1 at the end, but I am struggling with getting the switch to see my seed value.

The other thing I am not too sure about is the distinction between “floor” and “fit”. In my head I think I should be using a fit to opninputs rather than floor. But floor does work (I think).

Thanks anyone for the advise. Best Mark

Attachments:
Capture.JPG (177.6 KB)
switch_random.hipnc (91.4 KB)

User Avatar
Member
47 posts
Joined: 7月 2015
Offline
Hey Mark, try this one:
rand(ch("../attribwrangle23/switch_seed"))*(opninputs(".")-1)
Marius Schmücker
Houdini FX Artist/TD

https://marius-schmuecker.com [marius-schmuecker.com]
https://twitter.com/mareyus [twitter.com]
https://www.instagram.com/mareyus/ [www.instagram.com]
https://www.linkedin.com/in/marius-schmuecker/ [www.linkedin.com]
https://gumroad.com/mareyus [gumroad.com]
User Avatar
Member
660 posts
Joined: 8月 2013
Offline
Hi Mareyus.

Thanks for the tips!

Best

Mark
  • Quick Links