Forum Discussion

JohanneBrune953's avatar
JohanneBrune953
Community Member
2 months ago

Problem with a trigger

Hello all! I have an issue with a trigger that I've been trying to resolve since last week. Here is a summary of what I need the trigger to do: I have a general slide (slide 1) in a section that takes the participant to other slides when buttons are clicked. On one of these other slides (slide 2), I have a button that takes the participant to another slide (for supplementary information). It is on this last slide (slide 3) that the issue occurs; once all markers are visited, I have a "CLOSE" button that needs to appear which brings the participant back to slide 2. The problem is that the "CLOSE" button appears when the participant accesses the slide without having to click on all markers. Here are the triggers for slide 3:

Set state of button close - "CLOSE" to hidden when the timeline starts on this slide if CloseButton = value False

Set nameofslide to value True when the timeline starts on this slide

Set CloseButton to value True when the user clicks Button Close

Hide layer this layer when the user clicks Button Close

Jump to slide2 when the user clicks Button Close

Set state of Marker 2 to Normal when the state of Marker 1 is visited

Set state of Marker 3 to Normal when the state of Marker 2 is visited

Set state of Marker 4 to Normal when the state of Marker 3 is visited

Set state of Marker 5 to Normal when the state of Marker 4 is visited

Set CloseButton to value True when the user clicks Marker 5

Note that I have exactly the same triggers (with 1 less marker) on another slide that repeats the same actions in another section and everything works.

Does anyone have an idea why my CLOSE button is appearing before all markers are visited?

5 Replies

  • As Ron suggested, it's helpful to share the .story file. However, I'll try to answer based on the info presented. 

    Since you mentioned the triggers working on another slide, I'd guess that the reason the Close button isn't hidden when the timeline start on this one is that you're using the same CloseButton variable. If that variable is used in the same way on another slide, then it'll already be True when the user reaches this slide. 

    • Note: For troubleshooting, it's a good idea to show variable references. That lets you see if they are changing when and as expected.

    However, you don't even need a trigger to change Close to Hidden. Just set that as its Initial State.

    Doing that removes the need for the T/F CloseButton variable and those triggers.