Help with Disabling a Piston but not the switch


#1

Ok I have a couple of pistons here that act as intended except I don’t want the rw piston firing if the wendy car switch turns ryans working back on after being on once, but I need it firing if the wendy car Switch was on the first time.

What I’m trying accomplish is if the wendy car switch is on and the Ryan working switch fires in the morning it will do as intended the first time. the ryan working switch will turn off when the car drives away and the switch needs to come back on without the Rw piston actually firing.

Does this make sense? Lol


#2

The only thing I can think of is briefly pausing the piston while it turns the switch back on but I hate that idea.


#3

I do this by creating a variable in the piston, either boolean (true/false) or numeric. Then set the variable to true/false or 0/1/2/3 …etc after certain triggers happen in the piston. if you need to set the variable(s) from other pistons, create a global variable.

Add a check for the variable in the ‘only when’ section of the piston you want to restrict.


#4

I wish I understood more what your saying lol. I’m very new to webcore and I struggle past if this then statements.


#5

Can pausing the piston briefly cause issues. As of now that’s how I have it working. I just don’t know if that will cause bugs.


#6

All good. This forum is pretty useful as a reference for most things. Look at this thread with examples:

And check out the “example pistons” and “instructions & tutorials” sections of the forum for more info to help make more use of webcore


#7

As far as pausing, I’m not sure it will cause any issues if its working for you, the only issue will be limiting the functions of each piston.

pistons can’t do anything else while paused, so that’s why I use variables to limit functions inside of pistons so each piston can manage more complex situations.


#8

It literally only pauses it for a millisecond, turns the switch I need back on and then resumes the piston.


#9

Thank you!! I got it. The piston is locked out at 7:15am so I just have it waiting until 7:16 to turn the switch back on which is acceptable because the wifey wouldn’t get home until at least 7:25am