I am wondering if it is possible to simplify my code. I want to regulary close two inputchannels, to which I already made a reference. At every 150th output, I want to shortly open these two inputchannels. Now I write the code for the 150th and 300th output separately, but as I want to generate thousands of products, I assume this is not the most simple way to write my 4DScript.
The script I use now is:
Code: Select all
Do(
If(
output(c)=150,OpenInput(refAtom1),CloseInput(refAtom1)
),
If(
output(c)=150,OpenInput(refAtom2),CloseInput(refAtom2)
),
If(
output(c)=300,OpenInput(refAtom1),CloseInput(refAtom1)
),
If(
output(c)=300,OpenInput(refAtom2),CloseInput(refAtom2)
)
)
Thanks!
Eveline