I want to be able to change the On value of a button widget using other button widgets. How can I do that with OSC messages or scripts?
juste set the on value with the id of the button for example
@{button_2}
Or write VAR{on, 1}
in the first button's on
property and this in the second's onValue
:
// (value is the button's current value when the script is executed)
setVar('button_1_id', 'on', value)
Or using conditionals:
var x
if (value === 1) {
x = 'foo'
} else {
x = 'bar'
}
setVar('button_1_id', 'on', x)
Hi @Dalkont
Maybe a menu would be more suitable to set the button on value as only one value can be set.
Here is my proposal
menu-to-set-the-button-value-on.json (5.7 KB)
Cheers
1 Like
wow thats actually a really good idea. thanks