order of toggles

Jul 5, 2013 at 12:15am

order of toggles

I have three toggles. Now I want to determine the order in which they go on and off.
Possibilities are
1, 2, 3
1, 3, 2
2, 3, 1
2, 1, 3
3, 2, 1
3, 1, 2

How should I program this??

#255007
Jul 5, 2013 at 1:23am

on AND off? What’s the logic there? you’re trying to sense *any* action from the toggles?

#255013
Jul 5, 2013 at 1:47am

See the code attached.
I want to identify a change in the message box from 1 to 3 (either 1-2-3 or 1-3). Or from 3 to 1.

<code>

– Pasted Max Patch, click to expand. –

</code>

#255014
Jul 5, 2013 at 2:31am

Here’s two ways to approach it.

<pre>

– Pasted Max Patch, click to expand. –

</code></pre>

#255015
Jul 5, 2013 at 2:51am

That was interesting! Here’s a third way to do it:

<code>

– Pasted Max Patch, click to expand. –

</code>

If you also want to know also which of the three are at any point enabled/disabled, then you would need to work a bit with the [<< ] object.

#255016
Jul 5, 2013 at 3:20am

Thanks guys!!

#255017
Jul 5, 2013 at 3:57pm

i think i would usbers as placeholders “1,2,3…” for the order, then you can use [zl] or [coll] to change the list, then iterate it, and then use [route 3 2 1] to control the toggles.

#255060

You must be logged in to reply to this topic.