Chosing items

Apr 25, 2013

I'm playing with an idea, and I think I can do it, but i'm not quite able to get there.

Here's what I'd like to do:

We have for items on the screen. 

The user selects two of them.  It doesn't matter which he selects. 

When the user selects an item, its highlighted. 

When the user has selected two, they click next, and the two choices get carried over to the next slide.

Here's what I've done so far:

Created a value called "count" to track the number of items selected

Created values for each item to identify if they've been selected

Created states to show selection

However, it doesn't look like its changing the state at all.  I've attached my storyline file.

Can someone help?  Also, Is there an easier way to get to where I'm going?  (My brain is mush trying to track all the variables i have tied up in this one transaction!)

Thanks in advance!


5 Replies
Josh Uhlig

Hi Joe, Welcome to the community.

The good news is, we can clean things up alot:

  1.  First off, you can make use of the default slide layers and cut out a bunch of triggers.  If you make a new layer and use the "Selected" layer, you have no need to have a change state trigger telling the state to change the state to chosen, or back to normal again.  The default Selected state already works that way.

  2. We also want to add a Down state, and use the Down state to toggle the true/false variable.  That way it is true when selected, and false when not selected.

  3. And finally, we can handle the count of 2.  Add 2 trigger to each button to add or subtract 1 from the count depending on the value of the related variable.  Your condition on the next button can remain.

  4. I noticed the triggers on the second slide were pointing to the wrong timeline (object instead of the slide), so I cleaned them up too.

So that brings it to a total of 13 triggers only on the first slide.  I've attached my version.  Hopefully you find it a little easier/cleaner.

Joe Waddington

Hm... I thought I replied to these, but apparently it got lost somewhere in the internet. 

Thanks Michael & Josh!  I think I had too much tied up to the click, and that was muddying the water for me.

Josh - I've read #1 a couple times now, and I'm not entirely sure I understand it.  I see what you did in the file, but I don't see any additional layers.  What am I missing?

thank you, both, for the help!  I truly appreciate it!

Josh Uhlig

Sorry I meant states not layers!  I switched to the correct word half way through, but I had already confused you by then I'm sure.

You had added a 'Chosen' state to each of the buttons, but it is better to use the default 'Selected' state so you don't have to add triggers that tell the button to change states when clicked.  The Selected state automatically adds that functionality.  I also added a down state to make the toggle of the variable easier.

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