Conditional Statement Behavior
- June 3, 2020
- 1 reply
- 1598 views
I am trying to execute a script (non-Java) and the conditional syntax is tripping me up.
I have a button with multiple conditional tabs that I want to play based on the status of a user variable. The Only thing I place in the Conditional tab is an IF for that variable. The THEN section is all my actions, ending with assigning a new status to my variable.
My problem is that no matter what I do, the only tab that runs is the second tab. All 5 tabs function individually, but only when they are placed in the second slot SEE EDIT BELOW, and regardless of the status of my variable.
I suspect that is has something to do with the lack of an ELSE statement, but the only ones that seem applicable are "continue" and "pause", and I have tried both of those without success. The variable is a simple integer that is applied based on which of four buttons on the screen is clicked. I am essentially attempting to recreate an accordion interaction from scratch with custom graphics, so the variable is necessary to know which accordion tab is open.
It seems like my tabs should be pretty simple: IF <variable> = 0, execute tab 1 and assign <variable> as 1. If <variable> = 1, execute tab 2 and assign <variable> as 2. But as I said, it just plays the second tab over and over on every click. SEE BELOW
Any ideas what I am doing wrong?
EDIT: My description is slightly wrong after further testing. I cut the decisions down to just three tabs to do some tests. In no case can I get the left (first?) condition to activate. In certain configurations I can make conditions 2 & 3 activate. In certain configurations, only 3 activates. This is blowing my mind. I added a text box to display my variable to ensure that the variable was being assigned properly and it is. These are not complex actions, either. It is a combination of showing and hiding elements and running simple entry animations.
