Forum Discussion
Add Variable Count One Time Only
I am adding a variable count for slide layers where the variable is incremented by 1 at the start of the timeline. Is it possible to only have the variable count increment if this is the users first time viewing the given layer?
Action = Adjust Variable
Variable name is Score
Operator = + Add
Value = Value 1
When = Timeline starts
Object = Layer
The goal is to award points for visiting each layer, but I don't want to add points for simply revisiting the same layers.
25 Replies
- JerryBeaucaireCommunity Member
I was struggling to create a situation where users were required to hover over info buttons prior to proceeding in the training.
In this case, you could also base a trigger event on the state of ALL your info buttons having a state of VISITED. Make NEXT button visible when state of all INFO buttons is VISITED.
Maybe?
- LindsayWalker-aCommunity Member
Hey guys, I'm looking at this now and it looks like the interface has changed. There is no longer an 'operator' field in the trigger wizard. Instead of being able to increment with the adjust value trigger, now what you have to do is set it to 'Add' instead of 'Adjust value' Please update, I stumbled on this new feature by accident!
Hello Lindsay!
We've added a new Trigger Panel in the most recent update! It's an incredible addition intended for quickening your workflow. The triggers and variables are still the same, so no need to worry about learning the Trigger Panel all over again!
Good news, you can always switch back to the old Trigger Panel without losing any of your work!
- LauraBunte-fb29Community Member
Call me slow but I can't seem to make my slides do something similar. I want the score to add +1 only when the correct choice is clicked once. Not when clicking on it again or when revisiting the slide.
I have triggers that say: change the state of the object to visited when clicked.
Also included: add +1 only when object state is normal (default state).See attached storyline file. What am I doing wrong? Thanks for any assistance!
- JerryBeaucaireCommunity Member
Based on your description, my sugegstion would be an additional True/False trigger to limit how many time the +1 trigger can work.
- Create a TRUE/FALSE trigger called Q1Done
- The existing trigger that adds +1 you can add "on the condition that Q1Done = False"
- Add a second trigger that happens on the same event right after the +1 trigger to set the Q1Done = True
That should keep the +1 from working more than once.
- WaltHamiltonSuper Hero
What Jerry says will work. Something else you should know is that you shouldn't create triggers to set state to "Visited", of "Selected", or any other state that is built-in. You can recognize built-in states. When you create a new state, there is a drop down menu in the popup that asks for its name. All the states already on the list are built in. That means they come with their own triggers to make them function. If you write another trigger, it will most likely conflict with the native trigger, and usually causes really strange results.
- LauraBunte-fb29Community Member
thanks to you both Walt and Jerry -- it works! Why I wanted to make it more difficult, I can't tell you. ;-)
Appreciate the additional information about when to use a new state vs. built-in. This is a great community!
- LauraBunte-fb29Community Member
Sorry to come back for assistance once again -- I made the changes to the triggers, but now my points will not accrue in value. This file is only one of several scenes I have, all with the same triggers - click the right option once and get a point added to your score. Click the right answer again, no point is added. But the total points should accure in the feedback layer's upper right corner.
Any thoughts on what I am programming incorrectly?
Thanks in advance!
- JerryBeaucaireCommunity Member
The order of triggers is CRITICAL when you put several events to occur on a single click.
Move the "Set Q1Done = True" to the bottom of the group so it's the last thing that happens.
- JerryBeaucaireCommunity Member
Also, the Q1Done variable is only for the first slide. On the second slide you would use a new Q2Done variable.
Be sure to set the Q1Done = true when they click on ANY of the answers, right or wrong, else they can just change their answer, unless that's what you want them to do.
Related Content
- 10 months ago
- 10 months ago
- 10 months ago
- 10 months ago
- 10 months ago