I have these 5 different buttons with icons using Base64, I'd prefer to keep that functionality and is why im using the Button widget in the first place. Basically all I want to happen is that when i press 1 button the other 4 turn off, because they'll never be on the begin with, problem seems to be that the On value of each button is different and has to be as well, so Button 1 sends 1 as on and so on up to button 5 sending 5.
I've tried using onValue in the scripting to do some things but what ive come up seems to only create a loop because as one button updates a value for another, that button then sends the turn off script and its just a mess
figured it out, removed the custom variable, and just used if (value === 1) {} and set the values of the other 4 buttons to off, coming from basic python syntax, the === wasnt making sense but once i got past that its working.
== also works in many cases but yeah the equivalent to python's is ===.
On a side note you could use a single image and css filters to generate its different versions (well this would make sense if you put the images in a folder next to your session file instead of using base64).
strange, I thought == wouldnt work because I also tried <= and != etc. and those didnt seem to work as expressions. And bear in mind i really only know basic syntax and the variables, im no coding genius, just know enough to get by . Sometimes I do wish the UI had more control like with faders and knobs, and other elements but I understand there are ways to do it, just involves more coding than I care to go through
It would be really great if you could provide a little more information on how you implemented this feature. I am an OSC beginner and would like to understand this. Thank you very much.
this probably isnt the best implementation of the feature but basically, if the on value of the button is "whatever" then turn off all the other buttons.
I primarily use Unreal Engine 5, its a bit strange im sure but it works more or less the same as any other software, I just might have a bit more control over whats happening.