or rephrased: is it possible to have the switch node result emulate the way a diode works?
I often times find myself in need of a way to accumulate the number of occurrences of a condition being met, and each time I find out accumulate field is not what I'm looking for as the input and output are of a non-field type. It might not be possible but I can't be sure.
Pictured below demonstrates what I mean. The boolean (imagine it's the result of a group input or comparison) starts at 0, when switched to true it gets converted to a value 1 and added to the result of its original state (0), switching back to false returns its previous state (1) repeat until the reset switch condition is met to start it from the original state again. Clicking the comparison count 6 times would result in 3, clicking reset twice would reset it.
no blend file I'm afraid, just asking so I don't blindly sink hours into a dead end project idea.
var = False
tovar = True
(now state B), and again change it tovar = False
, you effectively returned to the state A. The interpreter doesn't maintain some kind of meta information like the history of the code. Of course it's different if you explicitly somehow output that "meta" information, e.g. in the example here I unmute and mute a node to reset the simulation. $\endgroup$