Forum Discussion

MikeFranzone's avatar
MikeFranzone
Community Member
3 years ago

Object states on main nav slide not affected by variable change

Set-up: Main nav slide has objects that allow for branching. Learner clicks an object and branches to view content. At the end of the branch, I have a (T/F) variable. I set it to true. Learner returns to main nav slide. I check the variable for T/F. If true, I change the clicked object to 'Visited' and change the next object to 'Normal'.

What works: Branch to content, setting of the variable to 'True'.

What does not work: None of the objects are affected by the variable change.

It is not working. I've tried all variations of "When revisiting", checked my variables, etc.

 

 

  •   You have one problem that is causing trouble, another that probably is, or will, and a third to think about.

    #1. The variables are changing on the branched slide,but can only be heard to change on that slide.  The nav slide can't hear them change, so the triggers never fire. Try changing the "when" to when timeline starts on this (nav) slide. You might have to set the slide to reset to initial state on revisit.

    #2. Built-in states (like Visited) have a superpower that automatically invokes their built-in functions, like turning to Visited state when clicked. If you create a trigger that duplicates that function, it can, and frequently does, cause a conflict.  Duplicate the Visited state, call it Completed, or something similar, and have the trigger change the state to Completed.

    #3. I generally set the variable that show completion at the end of the branched slide. That ensures that they went through the timeline of the slide. Otherwise, they can get credit for seeing the slide if they just go there, and jump back to the nav.

  • MikeFranzone's avatar
    MikeFranzone
    Community Member

    I agree with point #2 to a degree. If the slide is set to "Reset to initial state", then all of the objects reset, so the visited state is reset to normal (or whatever the initial state of the object was). Not what I need. I'm not too concerned with point #3.

    ==========

    I have a problem with point #1. Variables are not slide-based. They are project-based. If I change the value of a variable from any slide, the condition of that variable can be checked from any other slide. The variable does not need to be on the same slide. It essentially becomes a system variable and can be used throughout the project. It is not displayed in my screenshots, but when the value of the variable is changed, the reference "False" changes to "True". I check this value with the trigger but it does nothing to change the object state. This is a problem.

    See the attached quick-and-dirty example. What I am trying to accomplish works here. Branch 1 is visible. Branch 2 is not. Follow branch 1 and return to the main slide. Brach 1 is now visited, and branch 2 is visible. This is all done using a variable that is set on the branch 2 slide.

  • You are right that variables are global, and their content is available to any slide. That means you can put them in the "If" part of a trigger, and it can complete its function or not depending on the content. The content can control trigger completion, but cannot initiate trigger action. Don't confuse the act of their content changing, which is an action that can initiate trigger action. with the content itself, which can be used to determine if the action should be completed.

    Only the slide that changes that content can "hear" the action of changing; no other slide has a listener. In this case there is one slide open, the branched slide that makes the change. The nav slide is not open when the change occurs. By the time it is open, the act of changing is long gone, and it doesn't hear a change to initiate those triggers. Probably the best option is to write the triggers as "Change state of PictureX to State Y when timeline starts on this slide if HowMyschedWorks = true".

    The point about the Visited state is that if you create a trigger that says "Change state to Visited", and use the actual name "Visited", there is s high possibility you may have unpredictable problems.

    I'm not in a place where I have SL, so I can't comment on the example, but I wanted you to have an answer without having to wait on me.

  • MikeFranzone's avatar
    MikeFranzone
    Community Member

    Much appreciated. I will play around with it and see what I come up with.