General

script to change object colours

Started by auralsculpture on .

Sign in or create an account to join the conversation.

2 posts

Topic starter
I need a script that will change the colour of [fader1] with a switch [switch1] :oops:

I 'm working on an simple ImpOscar editor and the envelope amount (cc#24) controls either envelope 1 or 2 depending on a switch position (cc#119). I'd love to change the colour of the control with the switch that selects its function.
There are several other similar things in the interface so this is going to be used a lot. I may even use a similar function to make interface elements invisible ..
Easier than I thought

script on the button.

What got me is that a Knob has foreground and background colors, both of which have to be set, hence the 2 x RGB codes.


if (x<0.5)setattribute(EnvAmount, 'color',{RGB(1,1,1),RGB(0,0,1)});
else setattribute(EnvAmount, 'color',{RGB(1,1,1),RGB(0,1,0)});
:shock: