Forum Discussion
Storyline triggers based on attempt count not working as expected
My triggers are not behaving as I'd expect. Any input is appreciated (see screenshot).
I have tried multiple permutations of these triggers including increasing and decreasing the numbers, trying greater than/less than and greater than or equal to/less than or equal to options.
I have also tried building a custom true/false variable that switches from the default of "false" to "true" when the timeline starts on the "Try Again" layer and then setting the trigger to show the "Try Again - One More Try" layer based on that variable being true rather than the built in AttemptCount variable.
I have additionally opened a new project and imported the slides in case something was corrupted. None of these fixed the behavior.
Expected behavior
User gets the wrong answer once = "Try Again" layer displays
User gets the wrong answer a second time = "Try Again - One More Try" layer displays
User gets the wrong answer a third time = slide advances to next slide
Observed behavior
User gets the wrong answer once = "Try Again" layer displays
User gets the wrong answer a second time = "Try Again" layer displays
User gets the wrong answer a third time = "Try Again - One More Try" layer flashes on screen and then slide advances to next slide
Based on the behavior you've observed, I'd guess that your AttemptCount variable isn't getting above 2. When working with variables, I highly recommend showing the variable value in a temporary text box on the slide. That helps with troubleshooting, because you can see whether the variable changes as expected.
That said, I think you're making more work for yourself than is needed. Since it's a graded question slide set to 3 attempts, you could do this to get the behavior you want:
- Use a T/F variable to track whether an attempt has been made. The default = False. The Try Again button adjusts it to True.
- On the Try Again layer, use that variable to determine what message to show the user. For example, if it's False, show the Normal state of the text box. Otherwise, show a custom state with another message.
- Keep both the Correct and Incorrect layers. Adjust the layout to blank, and delete all the content. Add 2 triggers to those layers. The first trigger hides the layer when the layer's timeline begins. The second trigger jumps to the next slide.
This is demonstrated in the attached file.
4 Replies
- JudyNolletSuper Hero
Based on the behavior you've observed, I'd guess that your AttemptCount variable isn't getting above 2. When working with variables, I highly recommend showing the variable value in a temporary text box on the slide. That helps with troubleshooting, because you can see whether the variable changes as expected.
That said, I think you're making more work for yourself than is needed. Since it's a graded question slide set to 3 attempts, you could do this to get the behavior you want:
- Use a T/F variable to track whether an attempt has been made. The default = False. The Try Again button adjusts it to True.
- On the Try Again layer, use that variable to determine what message to show the user. For example, if it's False, show the Normal state of the text box. Otherwise, show a custom state with another message.
- Keep both the Correct and Incorrect layers. Adjust the layout to blank, and delete all the content. Add 2 triggers to those layers. The first trigger hides the layer when the layer's timeline begins. The second trigger jumps to the next slide.
This is demonstrated in the attached file.
- ChristaNovel637Community Member
Thanks, I have already tried your solution (T/F variable that changes after the first attempt is made). I also put a text box on the slide with the variable in it to verify it is adjusting. It is. However, it is still showing the "try again" layer one more time before it goes to "try again - one more try." I'll give a shot with a different state on the single "try again" layer vs two different layers and report back if that works.
- ChristaNovel637Community Member
Using states on a text box in one "try again" layer did the trick. Thanks.
- JudyNolletSuper Hero
You're welcome! I'm glad you got it working. Pay it forward when you can. 😊
Related Content
- 7 months ago
- 10 years ago
- 8 months ago
- 9 months ago