Forum Discussion

AbbyWalden-c5d2's avatar
AbbyWalden-c5d2
Community Member
3 years ago

Toggle between custom states

Hi, 

I would like an object to toggle between normal and a custom state. It looks like I can only use the toggle trigger with a Disabled or Hidden state... and  the same when setting up a true/false variable. I feel like I am missing something...

Any help is greatly appreciated!

 

  • If all you want is a toggle between two states when the learner clicks, use Normal and Selected. They have built-in superpowers to toggle back and forth.

    If your need to toggle at some other impetus, you will need a custom state, a T/F variable, and some triggers:

    1. Change to state if variable = T

    2. Change to other state if variable = F

    3. Toggle (not set) variable. 

  • Thank you, Walt. The problem I see is that when I set the T/F variable, I am not able to select the custom state to between. 

     

  • The toggle trigger is only for disabled and hidden which I have always found odd but is how it works.

    Walt is suggesting using a selected state which is the most elegant way to toggle a state.

    His other solution which will work well is to create the triggers in the order he suggest then it will work

  • Maybe I am asking the wrong question.... I want an object to toggle between states without interaction from the user. Is this toggle or maybe motion paths off to the side that trigger state changes?

    • PhilMayor's avatar
      PhilMayor
      Super Hero

      What triggers the state change?

      Sent from my iPhone

    • PhilMayor's avatar
      PhilMayor
      Super Hero

      There is a trigger when animation complete which you can use to build a state change. For the animation start can you use when timeline starts for the object? Or the trigger that starts the animation.

      Sent from my iPhone

  • Got it. Begin motion path1 when the timeline starts on the slide. 

    Change state 1 to state 2 when motion path 1 completes

    Change state 2 to state1 when motions path 2 completes.

    Move motion path 2 once motion path 1completes.