Add Variable Count One Time Only

Apr 13, 2017

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
Leslie McKerchie

Hello Tim,

Thanks for sharing your file so that we could understand what you were describing. I was able to see the same behavior you were reporting, but inconsistently as it did work for me at times.

That being said, grouped items can do that at times. I like to use variables on the layers when the layers are dependent on being viewed.

Check out my solution attached and see if that assists you.

Tim Ballew

Thanks Leslie, that did the trick!

However I'm a little confused on what you did. You had the default value for each Step as False, but why did it not continue to increment if you clicked the step multiple times?

I had to add an additional trigger to change the step from False to True after the first click. Then it wouldn't continue to increment, but yours worked without the additional trigger. So I feel like I am missing something or at the very least wasn't as efficient as I could have been. 

Thanks Again! 

 

 

Leslie McKerchie

Hi Tim - I used different variables.

So, each step started as false, right?

I'm adding to the score as long as the step is still false, meaning not visited. Notice that trigger order is important here - adjusting the score prior to the layer opening...

Because, the step changes to true (visited) once that timeline starts:

Does that help?

Rachel Crabtree

Thanks Michael Hinze for uploading your storyline file.  It was useful for my project.  I was struggling to create a situation where users were required to hover over info buttons prior to proceeding in the training.

The condition placed on the shape to add1 only if the shape wasn't in a state of visited did the trick to prevent repeated var increases for hovering over the same button.

Thanks!!

Jerry Beaucaire

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?

Lindsay Walker

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!

Lauren Connelly

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! 

Laura Bunte

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!

Jerry Beaucaire

Based on your description, my sugegstion would be an additional True/False trigger to limit how many time the +1 trigger can work.

  1. Create a TRUE/FALSE trigger called Q1Done
  2. The existing trigger that adds +1 you can add "on the condition that Q1Done = False"
  3. 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.

Walt Hamilton

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.

Laura Bunte

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!

Laura Bunte

I so appreciate your help. Now, sorry to say, the first point scored does not appear.

On slides 2-9 the  scoring is correct. But for the first slide, if the point is correct, nothing appears in the upper right of the feedback screen. Any thoughts? I forgot to ask, for each scene that follows, must I use Q9Done, Q10Done, and so on? Or can I reuse Q1Done, etc. for each scene?