Limit Clicks
Apr 11, 2023
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 challenge. (Three in all)
I have the lightbox slide set to "Resume saved state" so each time they access the lightbox activity, it picks up where they left off.
Here's my dilemma. On the first lightbox slide, students can, if they choose to, click all of the ingredients and complete the activity. How can I regulate the number of clicks students are allowed to do on the lightbox slide?
8 Replies
Here's an option:
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:
Thank you for responding so quickly Judy. Question:
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.
Do I add the variable 1 to all the ingredients? Or 1,2,3,4. And what does that trigger to prevent further clicking when the variable changes with the condition look like?
Think through what you want to track: the total number of clicks, which could be done on any ingredient. Thus, each ingredient needs a trigger to add 1 to the value of the variable when it is clicked.
As I said above, there are different ways to prevent someone from clicking >2 objects per visit. The easiest is to show a layer that prevents them from clicking the base.
The attached file demonstrates and explains this.
Note: To keep things simple, an item cannot be deselected. (It'd be possible to do that, but it would require a lot more programming. I'm not going to get into that.)
Judy, thank you so much for all your help! I sincerely appreciate you. I got it working and am so pleased with the result. Thank you so much!
Hi Judy,
I apologize, but I must have missed a step. It doesn't seem to be working now. Can you take a quick look?
No matter what ingredient is clicked, or how many times, "counting" is always set to 1 by this trigger:
Instead of "Set to 1", use "Add 1".
Thank you Walt. I KNEW I was missing something. Thanks to both of you!
As Walt always says, "PIFWYC (pay it forward when you can)."
😊