Hi, so I'm trying to use a menu and a variable to control a fader.
I've got this working.
if (Menu.selection==0)Fader.x=0;
else if (Menu.selection==1)Fader.x=0.5;
else if (Menu.selection==2)Fader.x=1;
But not this
decl vari, i;
i = round(Fader.x*2);
if (Menu.selection==0)i=0;
else if (Menu.selection==1)i=1;
else if (Menu.selection==2)i=2;
Any help would be greatly appreciated!
Using Menu's to Control Faders
-
- Regular
- Posts:52
- Joined:15 May 2015 17:46
- Contact:
Re: Using Menu's to Control Faders
Not sure what you are trying to do here. You declare `vari` but don't do anything with it. Then you declare `i`, initialize it, and immediately change it. Why bother initializing it, then? If `i` is supposed to be a fader's `x' property then then the value 2 is out of range. Unless you are trying to account for the case where `Menu.selection > 2` then fall back to `i` being instead based on the Fader's `x`. This would be more clearly expressed at the end of your of your `if/else` statements as `else i = round(Fader.x * 2)`. You will need to provide more information.