Light script to toggle multiple text objects
Posted: 30 Jul 2012 02:14
Hi,
I am trying to write a script in the "light box" of text objects to tell them to be visible (set at 0) when a fader is set between a range of CC values (or in some cases set to just one CC value) and to be blacked out (set at -2) otherwise.
My fader is named "f1", I am writing a script such as f1.x==0?0:-2 OR FOR MULTIPLE VALUES f1.x==1||2||3?0:-2 in the "light" box of the corresponding text object. I am basing this off the equation if a then b else C (a?b:c) but so far I am coming up empty handed. Perhaps I am going about this the wrong way or mistaken with my scripting language...
although it doesn't matter on the scripting level, just for the sake of knowing what I'm trying to do: there are 28 text objects that I am trying to have assigned to and essentially toggle their visibility across the CC values 0-107 of a fader but they are NOT mapped to even integers (some are mapped over a range of 3 CC values, some over 4, some over 1, etc.) so I need to be able to have specific control over at which CC values each text object will be visible at.
Any guidance or ideas would be greatly appreciated, cheers!
I am trying to write a script in the "light box" of text objects to tell them to be visible (set at 0) when a fader is set between a range of CC values (or in some cases set to just one CC value) and to be blacked out (set at -2) otherwise.
My fader is named "f1", I am writing a script such as f1.x==0?0:-2 OR FOR MULTIPLE VALUES f1.x==1||2||3?0:-2 in the "light" box of the corresponding text object. I am basing this off the equation if a then b else C (a?b:c) but so far I am coming up empty handed. Perhaps I am going about this the wrong way or mistaken with my scripting language...
although it doesn't matter on the scripting level, just for the sake of knowing what I'm trying to do: there are 28 text objects that I am trying to have assigned to and essentially toggle their visibility across the CC values 0-107 of a fader but they are NOT mapped to even integers (some are mapped over a range of 3 CC values, some over 4, some over 1, etc.) so I need to be able to have specific control over at which CC values each text object will be visible at.
Any guidance or ideas would be greatly appreciated, cheers!