This simple .tox toggles data between 2 dats. When in network mode everything works fine. But when in Performance or even when you zoom out of the base it stops working. The Count chop no longer counts and teh logic completely stops. I have tried a few things to no avail so i am leaning towards a bug?
So one of the issues seems to be that âcount1â isnât up-to-date. When you are in Perform mode, you are no longer looking count1 (viewer is off) other than via chopexec1, which only looks at count1 when it is triggered offToOn. Since offToOn isnât happening every frame, count1 is not correct. To fix, add a Null CHOP after count1 and set it to cook always. Otherwise, count1 is only cooked when data is requested, which is infrequent.
The other issue is that timer1 isnât always triggering a select state in button2. This looks like a bug with using the Override CHOP option in panel2. To work around, use op(âbutton2â).click in the onDone method for timer1. We have deprecated the Override CHOP parameter in panels in 099 so op(âbutton2â).click is a better way to trigger the state.
timer1 and the button is actually firing otherwise you wouldnât see the count changing, which is does as one of the 2 table entries gets updated.
There a problem with the logic however. In your setup you are triggering the chopexec1 script on offToOn and then checking logic1âs value, but because of Logicâs âOff When Zero Or Lessâ the Logic CHOP only cooks when its input is 1, therefore will not toggle since it wonât cook when input is 0. When you are not using/viewing the logic CHOP directly it wonât cook every frame (ie up at root looking at the component viewer).
To view this behavior, I added print statement at the beginning of your script that you can view in the Textport while its running. You can see logic1 doesnât toggle. Itâs a good habit to check your inputs in scripts like this when something isnât working as expected.
You could append a Null set to âCook Alwaysâ to logic1, but I would recommend a different approach where you point the chopexec1 directly to logic1. Since itâs monitoring logic1, this will force logic1 to cook every frame and then give you correct data. Then instead of using only offToOn callbacks, use valueChange. This is more direct by as you are triggering the script with the same data you are comparing/using in the script. This I have setup for you in /base3 in the attached file.
Hope that helps, you have a lot of scripts to CHOPs to scripts going on there so its a bit complicated. I would probably do it all in the Timer CHOP callbacks or a single script if starting from scratch, it would be easier to debug. baseCookingExample.2.toe (7.07 KB)