What Am I Missing Here? Changing State Using Variable

Hello!

I cannot figure out why, when the user clicks a house icon to return to a list of questions on another slide, the state of a shape is not turning green for Section Visited. My trigger looks clean enough:

This is what I'd like to happen:

1. User clicks House icon on slide 5 to return to questions ("home") on slide 3.

2. When user clicks House icon on slide 5, first trigger changes Section Visited variable to True and then jumps to slide 3. 

3. To indicate the section on slide 5 has been visited, a shape on slide 3 turns green.

When the user completes step 1, the jumping happens and the variable changes to True (step 2), BUT the state doesn't change (step 3).

Maybe I don't understand how all this works, but it'd be great to have a "WHEN Variable XXX changes to False" or "WHEN Variable XXX changes to True" option; I think I might need to add an additional WHEN for time - "When timeline starts on this slide" - but that seems to be an extra step when the variable should be the only thing that controls the changing of the shape's state, ya know? I shouldn't need to add another layer; it should occur because the variable is XXX not because of another time layer. Again, I could be misunderstanding what's going on.

What else do I need to do? Thanks for any insight.

 

5 Replies
Walt Hamilton

You said,

When the user completes step 1, the jumping happens and the variable changes to True (step 2), BUT the state doesn't change (step 3).

but this is not what happens. What happens is that  The variable changes to True, THEN the jumping happens. That difference is significant. Think of variables as being shy. When they change, they don't want everybody to know it, so they don't announce it to the whole world. They only announce it to the slide that makes the change. Other slides don't hear the announcement.

The variable changes on slide 5, and slide 3 never hears it change. The change happens before slide 3 wakes up and starts listening.

So you are right, you need to change the state on slide 3 "when the timeline starts if variable = True".

Your instinct to change the variable at the end of the visited section, and to use a custom state for the icon is solid.

Heather Vogt

But, if the trigger on slide 5 changes the variable on slide 5 and then jumps to slide 3, why doesn't slide 3 "hear" the change when it's on the receiving end of the jump? Variables are used/"heard" project-wide; that's their appeal, right? I don't need to go slide-by-slide to make tweaks or changes (like adding "When timeline starts..."); the variable, if I'm understanding it correctly, handles that dirty work for me because the variable is heard project-wide.

Since the trigger has the variable changing to T on slide 5 first and THEN jumping to slide 3, I'd assume slide 3's already awake and listening thinking, "Okay, based on one of the trigger's on my slide about changing a shape's color, I'm expected to show up and do something. Ah, yes, this variable changed to T somewhere; looks like I need to just change this shape's color. Done."

I feel like I shouldn't need to add the WHEN of the timeline starting because my variable has done something and it's being (or should be) heard project-wide. I may be misunderstanding still.

Heather Vogt

Gross. I realize how sloppy my trigger panel was. This is cleaner and makes more sense:

but I still feel the WHEN is unnecessary; the shape should just change because, based on the trigger, the variable changed somewhere and variables are heard project-wide.

But, hey, what do I know? Thanks again, Walt!

Walt Hamilton

I got home last night, and the cat insisted he had not been fed all day, and was STARVING. I hadn't been there all day, so I didn't know, and my wife was off to her quilting party, so I couldn't ask her. Fortunately, she left a note on the counter that said "I fed the cat", so I knew not to feed him again.

The note she left me is the variable. I couldn't see her feed the cat, but I could see the note and know what went on while I was gone. Storyline is just like I was. One slide has no way of knowing what happens on another slide, but it can read a message left for it in a variable, and know what the learner did on another slide, provided you, the developer used those actions on that other slide to change the contents of a variable.

The cat got pretty insistent, so I gave him a snack, crossed out her message, and wrote, "He's also had a bedtime snack", and went to my meeting.

The note is the variable. Everybody can see it, and it never changes unless you, the developer, create a trigger to change it.

My wife is getting older (I'm not, just she), and takes a bunch of medicines. She puts them in one of those little plastic gadgets with seven boxes. Every night, (if she remembers :) ) she looks in the box for that day. If it is empty, she knows she has taken her pills that day.

The pill box is the variable. She can't always remember everything, but if the box has pills in it, she knows to take them. 

To answer your questions, variables are designed to be seen everywhere, but not heard (much like small children of a previous generation).  SL cannot multi-task, so only one slide at a time can be active. SL has no memory, so when a slide  becomes active, it can't know what went on while it was hibernating. That's why variables were invented.  Each slide can look into the box (variable) and see what is in there now, but can't know what it used to be, and doesn't know if or when it last changed. I couldn't hear my wife write the note, but I can read it and know what went on at home while I was not there.