Jump to content
Sign in to follow this  
Tatsuman

Best way to get color from multilist in vex?

Recommended Posts

Hello Community, I am stuck on a problem to get colors from multi-list parameter. I am trying to implement picking a color from a multi-list parameter randomly and I wrote this vex below.

int seed = int(rand(@ptnum) * chf("colors"));

v@Cd = chv(sprintf("./color%dr",seed+1));

For some reason, it gives me black or white only... And I couldn't figure out why is this happening. Could someone advise me about this? Thank you in advance!
5ec7bf284aef5_X__Projects_Shundo_Harutabi.hiplc-HoudiniIndieLimited-Commercial18.0.3485_22_20205_01_31AM.thumb.png.d03ad8463f3b020f2e403223ef5a89f0.png
 

Harutabi.hiplc

Share this post


Link to post
Share on other sites

Figured out and it was very dumb... I had extra "r" after %d in sprintf function... Thank you all

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×