Triggers "when state of ... is ..." not working as expected

Since accessing objects state is not possible from javascript I decided to do boolean variables reflecting the down state of a number of pictures (the internal hover and down states added manually to a picture object).

After a while I found a solution to this but it doesn't work as I expected it to do in all cases.

Screenshot from storyline

As you see in the screenshot I have four picture objects, what you don't see is that they have a hover and down state. You see the triggers I have inserted on each picture to set and clear the boolean variables displayed below each picture.

Picture 1 and 2 would probably not work as intended anyway since they check for state normal for clearing the variable and I have a hover state, but even that doesn't really seem to work as should be expected since leaving the picture doesn't clear it either.

Picture 4 works as expected, but not picture 3. The triggers are displayed the same in the trigger panel but are set up differently and I can't understand why nr 3 doesn't work as well as nr 4.

 

Attaching example file.

 

13 Replies
Johan Bengtsson

I want the corresponding variable to be true when the respective picture is pressed, that is when the state is "Down".

I would expect picture 3 and picture 4 tp change V3 and V4 respectively in the same way. The parts you have higlighted looks the same in the trigger list and I would expect the same behaviour even if they are created slightly different, but I don't, picture 4 works but not picture 3

Johan Bengtsson

Thanks for your time, but I am not really looking for a way to solve it, but rather to understand why it doesn't work as expected. Picture 4 in my example file solve my immediate problem fine enough but understanding why the other ones doesn't work is an important part in developing faster and with less errors in the future.

Crystal Horn

Hi there, Johan.  Thanks for sharing your file.  I looked and also saw some behavior that felt a bit counterintuitive.  Picture 3 wouldn't change the variable when in the down state.  When I removed the second trigger, Picture 3 would then change the variable in the down state.  

I'm going to ask for some help from my teammates on the support team to have a closer look at the logic between "none of X is X" and "any of X is not X."  We've identified some issues with using "Normal" in these "when state of X" setups as well, so I'll ask my team to address that with you too.

You'll get an email from them soon!

Crystal Horn

John was able to identify a couple of issues with these "when state of X is X" triggers.  We found that triggers referring to the Normal state were failing to execute.  And we also noticed timing issues with "none of" used in the state trigger setup.

Thanks for working through it with us.  We'll let you know of any changes we make to this behavior.  For now, does using the "all of X is NOT X," as in picture 4, work for you? 

Chris Dorna

When will this be fixed

When none of .... are Normal or When all of .... are not Normal  still do not work.

See also my recent post: https://community.articulate.com/discussions/articulate-storyline/strange-behavior-states-in-drag-and-drop-interaction

I also tried it with an own state myNormal (see attached project), but that was not the solution.

Katie (Gokhshteyn) Riggio

Great news, everyone!

We fixed the issue where there would be timing issues when 'none of' and 'all of' were used in the state trigger setup. Here's how to update Storyline 360 to see all the recent enhancements and fixes.

If the problem reappears, please record a Peek 360 screencast for me and I'll be happy to help!

Katie (Gokhshteyn) Riggio

Hey there, Chris!

Thanks so much for replying back with your findings, and I'm sorry this problem resurfaced.

We'll need to take a second look at this, where I've shared your example with our Support Engineers. Keep an eye out for an email from the support@articulate.com soon after we carefully review the behavior!