I'm a little stuck and having late night brain farts.
I have two variables. I want it so that if either variable is true, then a third variable becomes true. Then I want to return the third variable to false if both 1 and 2 variables are false. However, I want the third variable to function independently as well. How can I code that?
This is what I got so far:
however this latches variable3 to true even when I return variable1 and variable2 to False. And I still want variable3 to be able to work independantly from the other two variables.Code:if (variable1 || variable2) { variable3 =1 ; }
Any suggestions??