Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

disabling buttons or counting clicks

Still a little green? Ask your beginner's questions here

disabling buttons or counting clicks

Postby dus » Mon Apr 15, 2019 8:55 pm

hello, i was wondering is it posible to limit the number of clicks of a panel?
i have a few cards i want the user to click just two of them at one moment like a puzzle, but im not sure how to, i was bypassing but it was very messy, im sure there is a better way to solve it, i dont know if it is by counting the number of clicks to two maybe and then i dont know how to disable the other panels, i looked for it in google but i couldnt find anything
i am very confused now
thanks in advance
dus
 
Posts: 8
Joined: Tue Jun 19, 2018 6:44 pm

Re: disabling buttons or counting clicks

Postby nettoyeur » Tue Apr 16, 2019 6:53 am

There are a dozen different ways in TD how to handle this.

here's a simple example attached using a Count CHOP with a limit applied.
But you could also use a Logic CHOP, set to 'off when outside bounds' and set the bounds to be between 0 and 2.
If you click Help->Operator Snippets, and lookup the examples for Count CHOP and Logic CHOP you'll get some inspiration.

And of course you could also script it in Python.
Attachments
max_2_clicks.tox
(1.76 KiB) Downloaded 2 times
Idzard Kwadijk | freelance TouchDesigner consultant | IdzArd.com
Checkout ChopChopChop.org - the TouchDesigner marketplace!
nettoyeur
 
Posts: 1073
Joined: Mon Oct 15, 2012 12:00 pm
Location: Amsterdam, The Netherlands

Re: disabling buttons or counting clicks

Postby dus » Tue Apr 16, 2019 11:08 pm

Thank you very much nettoyeur, your example is awesome!

im going to dive also in the logic, thank you!
dus
 
Posts: 8
Joined: Tue Jun 19, 2018 6:44 pm


Return to Beginners

Who is online

Users browsing this forum: No registered users and 9 guests