Forum Discussion

GlendaDeHoff-0c's avatar
GlendaDeHoff-0c
Community Member
3 years ago

States of Objects on a Layer Not Changing (Based on Variables) as Expected

I am not as savvy as some of you Heroes, but I am not inexperienced either. However, I am stumped with the following (story file attached) and would appreciate someone taking a look. The variable is changing, but the states are not. I have tried:

  • Changing the order.
  • Switching to “when the variable changes” instead of “when the timeline starts”.
  • Switching the states to Hidden if clockCounter = value + 1 with the else statement being to change state to Normal.
  • Separating the statements so that the hands are set to normal (based on the variable) when the timeline starts and are changed to hidden at the end of the timeline (based on the variable).

 

There is a clock on a 1-sec layer that was designed to show the passage of 4 hours.

When the timeline begins on the layer,

  • a series of statements, one for each of 5 hour hands to change the state of each to either Normal or Hidden based on the value of clockCounter .
  • The minute hand has a single spin animation that lasts for 1 sec.

When the timeline the timeline ends,

  • one is added to clockCounter.
  • a trigger causes the timeline to return to 0s (the beginning).
  • the layer hides when clockCounter is greater than 12.

I saw a thread that addresses this issue, but the discussion is closed. https://community.articulate.com/discussions/articulate-storyline/objects-not-changing-states-as-expected?utm_campaign=elh_search&utm_medium=internal&utm_source=elh-referral

  • MichaelHinze's avatar
    MichaelHinze
    Community Member

    Have a look at the attached and see if that's what you wanted. Rather than jumping back to the beginning of the layer's timeline, I Hide and then immediately show the layer again. Also, I set the layer properties to Reset to initial state.

    • GlendaDeHoff-0c's avatar
      GlendaDeHoff-0c
      Community Member

      That is awesome, Michael! Thank you, thank you, thank you for a clever solution. to a problem that I struggled with for way too long.  It seemed so simple to create the clock and I still don't know why mine didn't work - but I'll gladly use yours.