Toggle Between States...Odd Occurence

I was following along with this thread on toggling between multiple states. I only wanted to toggle between two states but did not want to use a variable as I have 231 rectangles whose state could change between fill colour white and fill colour black when clicked. So I decided to just copy and paste the example shape with triggers from a file in the above link.  It had the shape switching between four different colours. The starting colour was blue and I decided I'd try changing it to white. When I did, a strange thing happened - the shape only toggled between two colours (white and red) instead of all four. So in the end, I ended up getting what I wanted but not in the way I expected. Can anyone out there explain to me how that happened?

1 Reply
Jerry Beaucaire

The ORDER of the triggers is critical.  Also, your NORMAL and BLUE states look the same, so that is confusing the eye.

The reason GREEN and ORANGE never occur is because the condition to get those colors are never TRUE at the time that trigger is reached in the order of triggers.

Orange only happens when it's Green.
But Green only happens when it's Red.
But right above that, BLUE also happens when it's Red.  So the green can never happen because it was just changed to Blue. So Orange can never happen.