Need logical calculation/control actor suggestion
-
Seems like an ideal place for the javascript actor.
Also very minor bug report - it says compatator in the help for the comparator actor (see Skulptures post above) -
Michel was faster...
-
@[Michel](http://troikatronix.com/troikatronixforum/profile/9/Michel)YES!!! This is it! So simple, but need intelligent brains to show me the way. Thanks so much! -
Or paste the following into a javascript actor with 8 inputs
function main(){ total=0; for (i=0;i<8;i++) { total+=arguments[i] } return total>0; }
-
Well spotted @gavspav ;)
-
The javascript method is great.
But another very simple one can be setup using the 'Lookup' actor.It will output 0 if the 'compare' input is not found in the X (eight for this case) inputs.Otherwise it will say which input matches the 'compare'If your binary values run into eight value inputs, and you compare '1', you will receive a '0' if all of your eight values are not 1, and a value between 1 and 8 if there is a match. -
Thats great too!
Another way - how about the Maximum actor with 8 inputs.The advantage of this is that the 8 value inputs are 'active' - with the lookup actor you have to keep sending '1' to the compare input every time you want the actor to do its thing.Sorry if I'm getting a bit anal. On the same note here's a rewrite of the javascript:function main() { for (i=0;i<8;i++) { if (arguments[i]==1) { return 1; break; } } return 0; }
-
yep the maximum actor is even simpler to setup.
-
yes,Maximum is an easier choice than lookup.Its probably the easiest native Isadora solution. -
-
and thank you @gavspav
I just realized you've already suggested it as well. i'll try the javascript actor too, just for fun. cheers. -
the tutorial on Javascript for Isadora might be worth a read.
http://troikatronix.com/support/kb/getting-started-with-javascript/