Conditional Next Button?

May 04, 2018

Hey all!

I am using the Velocity templates and trying to make what I thought was a very simple situation.  Using the "Process Interaction" slide in this template set (the one with 6 boxes), I want no auto Next/Prev buttons on the player, instead I want a layer with a Next button I made to show up ONLY IF the user has looked at all 6 boxes.

I put a trigger on each of the 6 boxes that just adds to zero to my variable "counter" each time the user clicks any of those 6 boxes.  Since the boxes all have Normal and Visited states, I put a trigger on the slide that said "Show layer Next Button when counter changes AND Rect01's state does not equal Normal (and that same line for all of the 6 boxes with states)AND Rect02, AND Rect03...".

Why doesn't this work?  What's a better way to get that next button to emerge only once the user has clicked on all 6 of those boxes?  Thanks for any help you can offer!

K.C.

16 Replies
Katherine Murphy

THANK YOU! Sheesh I felt like I tried everything.  Why can't I change the visibility of a layer based on that second bullet in your note (Show Layer x when the state of ...)?!  It's the same sentence.  Why should one sentence work and the other not work?

But thanks for this sentence!!  Because it seems to work!

K.C.

Walt Hamilton

To explain, this: "Show layer Next Button when counter changes AND Rect01's state does not equal Normal (and that same line for all of the 6 boxes with states)AND Rect02, AND Rect03..." probably doesn't work because all the built-in states (including visited) are just like the rest of us; they all think they are normal. So if you ask visited if it is NOT normal, it says "False, I am a normal state".

You ask "(Show Layer x when the state of ...)?! It's the same sentence. Why should one sentence work and the other not work?"  Don't fall for the cheap allure of "Perform an action When state of XXX is ..." I've know for a long time that it works sporadically, if at all, but last week I learned why. Ashley researched somebody's project and found it worked if she listed only a few items, but not if the list grew longer. Four or five items checked in the "when state of ..." part of the trigger seems to be the maximum that will work. You can test this by cutting down the number of items in your trigger, to see if it works.  FYI, if you put "State of" in the "on Condition" part of your trigger, where it belongs, you can list as many objects as you want, and it will still work.

Ashley Terwilliger-Pollard

Hi Katherine,

I think Walt is referring to the issue we discussed here, where more than 5 triggers to change state, and then adjust the variable based on that state cause the variable to not change. It's something we've shared with our team as a bug, so I can keep you posted on that set up here.

In the meantime, if you're still stuck setting up what Tom or Walt suggested as alternatives, let us know! If you can share the .story file that's also helpful as we can make changes based on what you've set up so far. 

Katherine Murphy

Hmmm, the only thing that changed from my non-working version to Tom's working version was putting the Next button on the timeline versus the layer :
1. Next button on the timeline
2. hiding or unhiding it based on...
3. Normal/Not Normal states of the 6 other rectangles

Instead of (this way DIDN'T work) :
1. Next button in a layer
2. showing/hiding the layer based on...
3. Normal/Not Normal states of the 6 other rectangles... 

I'm not following the logic in your post. "Normal" is a state, right?  It's a different state than "Visited" or than "Hover", etc.  It does recognize when they are all "visited" or "selected" and not "Normal" - that's how the "unhide the Next button" trigger now works.  It doesn't seem to be the "Normal" state that is the problem, it seems like it's layer showing/hiding versus timeline item unhiding/hiding - which is weird to me.

I did have 6 buttons that needed to be checked for state - so I guess that pushed my trigger ONE PAST the bug-limit of 5 - ha!  Hopefully this can be addressed in an upcoming update!

Walt Hamilton

I'm not following the logic in your post. "Normal" is a state, right? It's a different state than "Visited" or than "Hover", etc. It does recognize when they are all "visited" or "selected" and not "Normal" -

The best wayI can explain it is the attached samples. WH3 is  SL2, and WH4 is 360. My explanation for why it doesn't make the other text box visible is that "Visited" does not report itself as "Not Normal", but I'd be open to a better explanation.

I will grant that it is a sometimes intermittent bug, but seems most reproducible when using "state of XXX is not normal".

Katherine Murphy

That seems odd - if I put a green box in the Normal state, and a red box in the Visited state, and when I run it, the box on the screen is red, that means if I ask (with a trigger) if the state of the box is Normal or Visited, it should report Visited.  Which would mean NOT Normal. 

 

And this DOES report correctly (your buttons are all not currently in the "Normal" state), the problem seemed to be that "Show" an item in a layer is not working reliably, where, for no apparent reason, "Unhide" an item on the timeline is working reliably.

All of these are ancient webpage/HTML terms, they MEAN something.  They aren't just words applied randomly.  Normal may sound like just a word describing something, but it's a STATE.  Its a category.  It's NOT Visited. 

The Show Layer versus Unhide on Timeline reliability issue is definitely a strange one, and I hope it can be solved soon!

Katherine Murphy

Hi Ashley!

The boxes with states were on the timeline, the Next button was in a layer.  The Unhide functionality is a bit weird to me - it seems that the entire purpose of a Layers panel is for Showing/Hiding items, having come from Autodesk Maya/3DS Max and Adobe ecosystems (which both have Layer panels used for hiding and showing things).  So it does not occur to me to use hiding and unhiding on the timeline.  Things I want to control visibility of, I put in the Layer panel.  It sounds like this is maybe not the best place and that the whole "Show layer xxx" trigger is just not to be trusted.

I am not understanding what your sentence "...as it's where the option to add in the button resides full time. " means?  I am not using the player's Next button... I drew a square and put the word NEXT on it.

Katherine Murphy

Hey Walt, thanks for this example, too!

I checked it out and the thing I don't understand is you have a trigger in here that says  "Change the state of Dude NOT Normal to Normal when..."  But the Dude NOT Normal text box only HAS one state - Normal. 

What would Storyline be changing based on the qualifiers?

Walt Hamilton

But the Dude NOT Normal text box only HAS one state - Normal.

Actually, all objects have two states, Normal and Hidden. I'm not sure what makes Hidden shows up in the states pane; maybe if you reference it specifically in a trigger, or if you change it (which is a bad idea), but sometimes it does.

There are three ways an object can be in its hidden state:

1. It can be set in a trigger.

2. It can be set to show later in the timeline. If you move it to the right on the timeline, what really happens is that it is in the hidden state until its "appearance" on the timeline. You can test this. Set an object to show on the timeline at 10 sec. Create a trigger to set its state to normal when the timeline reaches 5 sec. It will become visible at 5 sec, even though the timeline says it shouldn't even there. It's there, it's just in a hidden state.

3. It can have its initial state set to hidden, which is what happened to my Dude NOT Normal text box. So if the clickable objects report their state as we think they should, it would change from Hidden to Normal if the button you click is accurately reporting itself as Not Normal.

Walt Hamilton

All of these are ancient webpage/HTML terms, they MEAN something. They aren't just words applied randomly. Normal may sound like just a word describing something, but it's a STATE. Its a category. It's NOT Visited.

I think here you have come to grips with the real problem. You describe the way the software should work.

all the built-in states (including visited) are just like the rest of us; they all think they are normal. So if you ask visited if it is NOT normal, it says "False, I am a normal state"

Here is where I come to grips with the real problem. I describe the way the software actually works. I agree with you, an object should report itself as "True, I am not Normal" if it is Visited, and a trigger condition interrogates if it is NOT Normal. I'm reminded that the difference between lawyers and God is that God doesn't think He is a lawyer. The difference between Normal and Visited is that if the question is phrased a certain way (Are you Not Normal?), Normal doesn't think it is Visited.

I've attached new versions of the files that don't change the state of a text box on the base layer, and also don't show a layer, because they don't accurately answer "If you are NOT Normal" when in the Visited state.

As to the difference between the timeline and layers, this is one thing Articulate really did right. They gave us a lot of options. If you want an object to appear or disappear, it can be done using the timeline, the hidden state, or a layer, all of which have strengths and weaknesses.

1. Moving an object's opening or closing end on the timeline is the fastest way to have it appear or disappear. The trouble is that each can work only once.

2. Creating triggers to appear and disappear takes longer, but can be done multiple times.

3. Showing and hiding a layer takes longer to create than a simple trigger, but can be used multiple times, and has the added advantage of operating on multiple objects at once.

So layers work like you are accustomed to them working, and with the other two options, you may have a bit more flexibility.

 

 

 

Katherine Murphy

Hey Walt!

The problem with your assesment, for me, is that I have found it to work in the exact opposite way you are describing.  You mention that States are not to be trusted, and that objects on layers and timelines are reliable and done right.

I find that Storyline DOES reliably report correctly when objects are in the Normal state or not, but that Storyline is NOT to be trusted when making triggers that begin with the "Show Layer" action.

Right now I have "If the state of Rect01-06 is not Normal" paired with "Change State of NEXT Button to Normal" - which works great.  Previously, I had the same If statement paired with "Show Layer X" - which simply did not work.  It knew what the states were, it just wouldn't show that layer.

Weird, right?

This discussion is closed. You can start a new discussion or contact Articulate Support.