Change Variables within function
-
Hey guys, i am so sorry for this question, its so noob, but i sinmply have forgotten how to do it:
How can i assign a variable to a value that i get with an inline function? I decklar a variable x on global level, but how can i change the value?Thank you so much
-
@Ben-Catman x = 10
-
haha of course, but i want to change the value x with a slider and use the new value within another inline function like this:
var x = 10;
-
get new value from slider for x / say x becomes 12
-> use the new x value in another inline function:
Filter1.setAttribute(1,(value+x);
-
-
@Ben-Catman said in Change Variables within function:
i want to change the value x with a slider
In your slider's control callback use
x = value
-
I think you could just
reg x = yourKnob.getValue(); // declare x // then just use 'x'...
I think you can also
local x = yourKnob.getValue(); // from within your inline function... // then use 'x'...