Want to Expand/Collapse Devices Reaction Solved

2.18K viewsGeneralReactions
0

I suck at making reactions.

Need help with making an advance reaction to toggle between states both expand & collapse using one button in my touchosc controller I’m currently building?

Seems simple, but spend three days now. I tried the Device is collapsed value but no luck and Im not able to figure out the more in depth reaction programming any help would be appreciated.

I’ve included my css script and template below.

Update!!!
With the help of amazing GlennV who is kind enough to help me out, we got the show/hide device or blue hand device selected working.
Which you can download and add to your own projects.

Note, There is a css bug and GlennV will raise the issue. But in the meantime it works, you will need to change and assign it to your own button and it should be working with momentary button config.

Thank you GlennV

Glenn V. Answered question
1

Hi shasta,

Here’s the file I still have saved from that interaction. It’s not what Harmonique posted, which was probably based around the TouchOSC functionality; it’s the basics on how to make the devices fold and unfold.

The descriptions on each Action Block give info on what they do.

The first Action Block is only necessary if you use a Momentary Button as your Listener:

  • If you do, and you’ve changed the Listener to one of your device, then you’ll need to open this Action Block and change the Condition to listen to your Listener. The condition checks if the Listener’s value is 0.
  • If you use a Toggle Button as a Listener instead, you may remove this Action Block altogether.

To summarize the Reaction:

  • On a button press,
    • the Reaction will first look for a Selected Device:
      • If a Device is selected, it will toggle its folding state and end the Reaction.
      • If no Device is selected, it will move on to the next point
    • If no Device was selected, the Reaction will check if there’s an Appointed Device (AKA Blue Hand Device):
      • If there’s an Appointed Device, it will toggle its folding state.
      • Otherwise it will leave the Reaction
  • On button release the reaction should do nothing
Glenn V. Answered question
You are viewing 1 out of 3 answers, click here to view all answers.