Carrying variable value forward across successive runs of a piston

variables

#1
  1. I create a variable and set initial value setting to “no value set”
  2. A piston that uses that variable runs and sets a value for the piston
  3. The same piston runs again - what is the starting value of the variable in the piston?

Example:

When this piston a second time, does the washerRunning variable:

  • Start with the last value set by the piston (“False”) the previous time it ran?
  • Reset to blank when the piston starts?

If the answer is that the variable gets reset, is there a way for the last value set for a variable in a piston to carry forward into the next run of that piston?

Thanks!


#2

it carries


#3

also: When you post pistons, click the green button beneath them, so it takes an anonymous snapshot for you to share with us. Also makes troubleshooting a little easier because we can easily see what type of devices each device is.


#4

Thanks - I intentionally just did a quick screen shot because I wanted to focus on just that part of the piston, but I see what you mean about providing the additional info in the green camera screenshots…good point, I’ll do that in the future. :slight_smile:


#5

for sure! hope it’s working as intended! I love using variables that retain status execution to execution… it’s how I set up a lot of my stuff!