Forum Discussion

MikeM006's avatar
MikeM006
Community Member
4 months ago

Storyline Branching Variables not Working?

I have a slide that serves as a "hub" for several subtopics which the user views then returns to after completing each one.  The user progresses from the last screen of last subtopic to the next slide that comes after the subtopics. 

 

I have a number variable, IS_Topics set to 0, and upon clicking each button on the hub, "1" is added to this variable.

On the last screen of each topic, they are directed to the next section of the course if the variable IS_Topics has the required value, or else they are directed back to the Hub. 

On testing this, I am always directed back to the hub despite having viewed each topic, after confirming that each topic includes the third trigger on the "Next" button. 

Am I missing something? 

 

2 Replies

  • MichaelHinze's avatar
    MichaelHinze
    Community Member

    Try switching the trigger order so that the "Add value..." trigger is executed BEFORE the "JumpTo slide 1.42..." trigger.

  • I agree with MichaelHinze​. Trigger order matters. A slide can't run a trigger if the program has already jumped to another slide. A "jump to" trigger should always be the last one in any series of triggers with the same "when."

    Whenever you're using variables—especially across multiple slides—it's helpful to show the variable references in temporary text boxes. That lets you see whether a variable changes as expected.  

    By the way, adding 1 to a number variable works to track completed topics—as long as the user doesn't repeat a topic. If they do that, the number variable would reach the total you're looking for but without having viewed all of the topics. Another way to track topic completion is to use a T/F variable for each topic. (See: TIP: Create a Custom Menu Slide | Articulate - Community)