Forum Discussion
Change States When Object is Clicked on Multiple Times
George,
What an eye-opener this has been for me. Your Character never changed to calm because of the order of the triggers. When the first trigger found him angry, it turned him to calm. Then the second trigger found him calm and turned him back to angry. (Changing the order of the triggers would make him always calm and never angry, for the same reasons.) I always thought that only the last state persisted, but looking at Rebecca's file, I realize that in reality, only the first state is never used. Her blue state is never seen, because her last trigger always turns blue to normal. Since they are identical, nobody notices.
I did the same with your sample. I duplicated the calm state, and called it New State, set up the triggers, and now you can click him and he toggles between calm and angry. The difference is that there are three states, and the one associated with the first trigger is never used, so he looks to be switching between two states. (I did add a little color to the New State to make it obvious what is happening.)
You may need to change the order of the triggers, and maybe duplicate the angry state. Depending on his initial state, it may take two clicks to change him the first time.
Related Content
- 11 months ago
- 4 months ago