Forum Discussion
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.
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.
- MariaCSStaff
Hi, everyone.
I just wanted to share that we are no longer seeing the bug reported where the trigger using "when the state of none" is not working using the latest build of Storyline (3.61.27106.0).
If you're using the latest version and you're still experiencing this issue, please reach out to our support team through a case. - JohanBengtssonCommunity Member
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
- JohanBengtssonCommunity Member
... when State None Of ... Is: Down
should behave the same as
... when State All Of ... Is not: Down
If there is only one object selected in the list of objects.
By pure logic this should be the same, one works the other doesn't and I would like to know why, and I strongly suspect this to be a bug.
- JohanBengtssonCommunity Member
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.
- JohanBengtssonCommunity Member
Yes, I am aware of that, and I would like to know why "none of is down" doesn't work when "all of is NOT down" does. Logically they are the same when only one object is selected.
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!
- JohanBengtssonCommunity Member
Thanks
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?
- JohanBengtssonCommunity Member
Yes that works for me for the moment.
- ChrisDornaCommunity Member
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.
Thanks for reaching out and letting us know that you've been affected by this as well, Chris.
It's still open with our team.
I wanted to share some information on how we define bugs and how we tackle them when they occur.
I'll update the impact to reflect additional users.
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!