Stop flashing lights when mod changes or button pressed


#1

I have a piston that create security activity and when it detect something it start to flash some lights using the flash method .

I want it to stop if mod changes to Home or a button pressed .
I need it stop ASAP and not wait till the end of the flash counter .

I tried using a virtual switch and a while loop but it didn’t work

Here is a sample piston I created

Thanks


#2

have you tried CANCEL ALL PENDING TASKS?


#3

I didn’t try it . will do and update .


#4

if that doesn’t work, i have another solution.


#5

I tried cancel all pending tasks and also exit and at first it seemed to be working but after several tries it just didn’t work . not sure why .
Now I’m testing the pause/resume piston which seems to be working till now .
I hope it continue to work as expected .


#6

I was going to suggest that as a second option.