Hallo everyone!!!!
Just a simple question. I have a queqe with a particular way to manage the products inside. I use the "send to" function number 6 (By atom name:if the atom name of the 1st atom in the queue matches "XXX" than send to channel 1 else 2) but I have to make a change. I want the atoms different by "XXX" are sent in channel 2 or 3 or 4 randomly...
What can I have to do to reach my purpose?
Thanks in advance!!!
SEND TO n° 6 with adjustment
Re: SEND TO n° 6 with adjustment
Hi Spaggio86,
The predefined logic you selected uses the following 4DScript code:
You can use the function dUniform to generate a random discrete value between 2 and 4.
In other words, if the atom name of the 1st atom in the queue doesn't match "XXX", then use dUniform(2,4)
Regards, Nick
The predefined logic you selected uses the following 4DScript code:
Code: Select all
if(CompareText(Name(Rank(1,c)),[AtomName]),1,2)
In other words, if the atom name of the 1st atom in the queue doesn't match "XXX", then use dUniform(2,4)
Regards, Nick
Re: SEND TO n° 6 with adjustment
Thanks Nick, i used that code with the dUniform distribution and it works!!!
I start to understand this language...
I start to understand this language...