Button.holdtime ??
Greetings,
Has someone some experience with the BUTTON.HOLDTIME data object?
What part of a button event could it be used in?
In the HOLD: it would seem that it could be used to increment a variable as the button is held??
Thanks
Has someone some experience with the BUTTON.HOLDTIME data object?
What part of a button event could it be used in?
In the HOLD: it would seem that it could be used to increment a variable as the button is held??
HOLD: { nVARIABLE=BUTTON.HOLDTIME }Seems awful processor intensive.
RELEASE: { nVARIABLE=BUTTON.HOLDTIME }Seems like not the right place to put it.
Thanks
0
Comments
This is a very simple yet efficient way to do variable hold and repeats. Just like an alarm clock or radio button where you hold the button down and the time advances slowly but keep holding, say after 5 seconds it starts to advance faster.
I originally did this variable hold-n-repeat via a time_line cuz I didn't know button.holdtime existed, although I'm sure I glanced over a million times but matt posted this just a few weeks ago and in one line it does what 10 lines or more did via the time_line.
And I thought I was clever when I created the time_line version. Oh well, live and learn!
Well, the holdtime will always be 0 in the release - 'cause if you release the button, it's not longer hold
One more solution if you need to do some action if button was hold long or short: I'm missing a EVENT_VAR - a variable which is usable within the whole event (similar to a LOCAL_VAR / STACK_VAR within i.e. the PUSH section)