Forum Discussion

JacquesMonica's avatar
JacquesMonica
Community Member
2 years ago

State Changes using variable values

I'm looking for a way to trigger a state change from disabled to normal, using a variables value? I want the user to visit 10 slides before a button becomes available to branch to a new section.

My Variable is counting correctly, but it never changes the state of the disabled or hidden button(or shape) to normal.

  • It's hard to troubleshoot something like this without seeing the .story file, but I'll give it a try.

    Here's a typical cause for that sort of problem: The trigger to change the state is set to run when the variable changes. But the variable changes on another slide. That means the trigger will never "see" the variable change, so it'll never run. 

    • If that's the case, what you need instead is a trigger that runs when something happens on the slide (e.g., the timeline starts), and with a condition that checks the variable's value. 

    This post might be helpful. It's about controlling the Next button. However, the same basic steps apply for enabling another button.

  • Judy's post came through while I was typing mine . . . so . . . what she said :)

  • JacquesMonica's avatar
    JacquesMonica
    Community Member

    Judy and Ron,

      You guessed it exactly!

    I was asking the scene to check the value when the 'Variable changes' as a part of an Object trigger, when I needed to check the value on a Slide Trigger during a 'Timeline Start'...

    and voilĂ  just like that it works.

    I scratched my head and read several blogs on this one, for quite a few hours, Thank you!