I’m trying to retain the value of a pressed button for 10 seconds. After this delay, the value can go to False again.
It seems trivial to me, but i can’t figure out the right combination of datadams, recorders, timers,…
Anyone?
Thanks guys!
I’m trying to retain the value of a pressed button for 10 seconds. After this delay, the value can go to False again.
It seems trivial to me, but i can’t figure out the right combination of datadams, recorders, timers,…
Anyone?
Thanks guys!
Not sure how this would work using native grasshopper components but it can be done pretty easily with a scripted python component (attached). This is just a modified version of a script that
@AndersDeleuran posted here.
161122_GHPy_Timer_Boolean_Delay.gh (6.0 KB)
Oeh, that’s neat! Thanks to both of you!
Very useful script. It is possible to make a small adjustment, more precisely I do need something similar but that can switch on for a second only when have an input boolean set to True?
The timer starts as soon as I open the definition even without pressing the Reset
button. Please, can somebody modify the script to start only when the Reset
button it is pressed or receive a True
value? Thank you.
Some of the scripts posted over might be closer to what you’re looking for:
Actually I found one that fits my needs: How to run a GHPython infinite while loop with Timer - Scripting - McNeel Forum