Forum Discussion
KatherineAdr606
2 years agoCommunity Member
Limit Clicks
I have a cumulative lightbox activity throughout my Storyline program where students can add ingredients to a pizza. Students are routed to the lightbox activity upon successfully completing a chall...
JudyNollet
2 years agoSuper Hero
Here's an option:
- Create a number variable with the default value of 0.
- This is to track the number of clicks.
- To restart the counting each time the user returns to the slide, use a trigger that resets the variable to 0 when the timeline starts. (FYI: "When timeline starts" triggers still run when a slide is set to its resume saved state.)
- Add a trigger to each ingredient that adds 1 to the variable.
- Add a trigger(s) to prevent further clicking when the variable changes with the condition that the variable has reached the limit you want to set.
- There are different ways to prevent further clicking. For example, you could show a layer that has its properties set to prevent clicking the base. (In that case, you'll also need a trigger to hide the layer at the appropriate time.)
To help with development/troubleshoot, I highly recommend that you add a temporary text box to the slide that references the variable. That will let you see its value change when you Preview the slide, which helps you ensure that the triggers are doing what you want them to.
If you're not familiar with variables and conditions, it's worth the time to learn about them, because they provide the real power in Storyline. Here are the User Guide articles: