Over my head in variables- please help! :)

Hi all. I'm hoping that someone can help me work through this interaction. I have a prototype almost working, but can't get it all the way there. 

In the interaction, the learner has to select 4 out of the 6 characters for their team. I don't want them to advance until they make the correct choices. It works great, except in a few choice cases. For example, if the learner first selects all 6 of the characters and then un-checks the two incorrect characters. In that case, the variable doesn't reverse and they still cannot move forward, even though their selections are now correct.

Hope someone can help me out here!! 

Thanks in advance

11 Replies
Phil Mayor

I would add conditions based on the selected state to stop progression so if all = selected then do not progress (show layer)

Then use a numerical vairiable and increment it based on the selected state and only allow move to next if = to 0

Add a trigger on the next button to set the variable to 0 (first trigger) so each time it is pressed it counts from the start again.

May not have explained this well :-(

Annie Jean

Hi Kristin,

I joined the file with some changes. I have only used the "CompleteTeam" variable.

I have made the changes to the variable when clicking the next button, which makes it easier... to me!

Hope it helps and don't hesitate to post back if you need further information.

Have a nice day!

Annie

Kristin Savko

Annie- THANK YOU!! That's so clear to me. It never occurred to me to make a state equal to "not selected." You're my hero today for sure!

Phil- I think that almost does make sense, although Annie's solution is more intuitive to me. Thanks for the key about setting the variable to zero when clicking the next button. That's the key point that I was missing when I was trying last week to do this using numerical values. 

Thanks again to the both of you!

David Anderson

Hi Kristin,

Here's a small modification to your existing project. I don't think you need all the WrongTeam conditions since it adds another layer of complexity.

To test and verify, I added a couple instances of your variables (CompleteTeam and WrongTeam) on the base layer so I could verify things were working as expected. It's a good idea to include those references to troubleshoot files w/variables.

Check it out and let me know if it works for you.

Rebecca Fleisch Cordeiro

I see that this is resolved, but before I read any of the solutions I thought, for the sake of practice, I'd give it a go myself. My solution was similar to Annie Jean's, and I wouldn't have bothered posting, except that I wanted to thank you, Kristin, for asking the question and posting the story because I love what you did with the check boxes and the selected state. It might be "old news" to many of the community members, but I'd never thought about doing that and I really like it. I'm sure I'll be using it.

Oh, my solution also only used the CompleteTeam variable. Also, I created 2 Oops layers.

Oops bad choice layer

This layer displays when the Learner selects either of the "bad" choices IF that checkbox is selected. The layer prompt says to go back, uncheck the box, and try again. Because the Oops layer only shows if the checkbox is selected, it won't display when the Learner unchecks the box. And, it doesn't require the Learner to click Next

Oops layer incomplete team

This layer displays when the Learner clicks the next button if not all of the 4 correct choices were selected. Same prompt that Kristen had.

And the Learner can move to the next slide if CompleteTeam equals true, i.e., when all 4 correct choices were selected.

Thanks again, Kristin!

Kristin Savko

Hey, thanks Rebecca! I'm so glad that you learned something too!!

I'm pretty weak when it comes to understanding variables. I have this "I can't do it" mental roadblock that comes from how much trouble I always had with Flash. I'm working hard on getting out of my own way though!

I talked in circles with people around the office to figure out how to let the learner make choices but get immediate feedback on each individual choice in that way. In the end, I'm pretty happy with this solution.

I do like that you got the two layer thing working. That's probably ideal...