Does the SELECTED state not work anymore as an element for TRIGGERS

Nov 23, 2022

Hi. I have an exceedingly simple issue. I have a number of choices I am offering the user and I want to add up how many options were chosen. I want them to be able to change their mind and so I want the total to subtract whatever option they have decided to not choose.

Sounds simple. I thought it was. I have built this a dozen times and it really is super simple.

in the past, I simply put the following trigger on any button I wanted to track the sum on:

Add 1 to variable NUMBER 
when user clicks BUTTON
if BUTTON state = SELECTED.

Subtract value 1 from variable NUMBER
when user clicks BUTTON
if BUTTON state = NORMAL.

Always worked.

However, Storyline is indeed subtracting the value 1 from the NUMBER when the user changes their mind, however, it never adds the 1 in the first place. All my tallies are going into negative territory.

Here's a screen grab of the demo linked below:

And here is a link to the demo.

ADDITION ON SELECTED STATE | Review 360 (articulate.com)

Can anyone tell me what I am doing wrong? I just refreshed and reinstalled my version of Storyline yesterday, so it's fresh and new and shiny.

I hate variables and triggers being dependent on STATES because in the past it was so flaky. But it's only recently I have had the confidence in it to do simple arithmetic in a simple way. 

Is the SELECTED state not visible to triggers anymore?

9 Replies
Diarmaid Collins

Hi Jürgen. Thank you for the prompt response. Weird. In my demo, it is the NORMAL state that is functioning. It is the SELECTED state that fails to compute. But, you are right, if I change the SUBTRACT to register NOT EQUAL to SELECTED it does indeed work.

However, there was a caveat that I didn't mention in my original post - the client likes/wants HOVER states on their buttons (I know!) so I wanted the maths to trigger on the specific states, but introducing the third state would mean the math would double up for the NOT SELECTED, would it not?

Walt Hamilton

All the built-in states are just like the rest of us - they think they are normal. In the case of the states, they have a valid reason for thinking so, because they are all overlays of Normal.

When you click the button in a Normal state, it first turns to Selected, then does the associated triggers. The first trigger (add) adds one because the state is Selected. Then the second trigger subtracts one because Selected self-identifies as  (and is)  Normal. Both triggers are functioning correctly, but it happens so quickly you don't see the addition. You can test it by disabling the subtract trigger.

I don't know that it is a problem (as in bug), but as you and Jurgen found out, Not Equal to Selected works, while Is Equal to Normal doesn't.

Erika Flindall

This worked before, but now the default for "Adjusting variable" is SET, so you have to tell it what to set it to!  

I am trying to add a trigger that will subtract 1 when they've seen a slide layer.  I have a variable set so when they see the layer, it changes the true/false variable to True.  I'm trying to use this adjustment to trigger the subtraction.

 

Anyone have a suggestion?

Judy Nollet

The default action for adjusting a variable is to set it to a specific value. However, math operators are available for numeric variables. Just click "Set" to reveal the drop-down, and then select the desired operator.

FYI: The dashed underlines in the Trigger Wizard indicate parts that can be edited.