How can I stop same action using the same trigger?

ADiB

New member
I want that, If I shake my phone the tourch should turn on and If I shake again, then the tourch should be turned off.

But the problem is, If I shake once the touch turned on for 1 second and again turned off.

How can I solve this problem?
 

hsurB

Well-known member
Add a constraint to macro at the bottom - macro not invoked in last two seconds(this macro) for exemple
 

ADiB

New member
Add a constraint to macro at the bottom - macro not invoked in last two seconds(this macro) for exemple
It's working. But it's working on second time. The previous problem remains when I shake first time.
 

Attachments

  • Screenshot_20240208-130742.jpg
    Screenshot_20240208-130742.jpg
    285.9 KB · Views: 8

Endercraft

Moderator (& bug finder :D)
It's working. But it's working on second time. The previous problem remains when I shake first time.
You can toggle a boolean variable then using constraints of if statements, and trigger actions accordingly.
 
Top