Changing "icon states" on scene completions

Hi,

I'm building an e-learning course. I have a "Main Menu" from where the user can jump to the different scenes (each scene is represented with an icon). I wish to change the state of these icons when the user has completed the scene associated with that icon.

Here's what I did. I added a Project Variable (let's call it x). I initialised x with false, and added a trigger that set x to true when the timeline ends. This trigger was added on the last slide of the scene.

Then in the main menu slide, I added another layer with the changed icon. I then created a trigger which reads thus: "Show layer New Layer when the time starts If x is equal to True".

However, when I preview the project, and I complete the said scene the changed layer is not visible. When I am editing the slide (main menu), I can notice the changed icon state if I show/hide the added layer (so I surmise the error does not lie in the way I am handling layers).

Could someone please point out the error that I am committing here and what would be the correct way of achieving what I wish to achieve.

6 Replies
Christine Hendrickson

Hi there Rahul. Welcome to the community!

Just curious about one thing - why use a layer for this? You should be able to accomplish this pretty easily using just states on your icons. 

Also, the trigger you're using to adjust the variable sounds good, but how do you have that slide advancing? Is it advancing when the timeline ends, or is the user interacting with a navigational button to move back to the main menu?

If you have a visited, completed or custom state for the icon, you should be able to trigger that state change when the timeline starts, on the condition that the variable equals "True".

If you still have trouble with this, I'd be happy to take a look at the .STORY file.

Thanks!

Rahul Jain

Hi Christine,

Glad to be a part of the community.

I was using layers because I was not aware about icon states. I would switch to icon states.

In this case, the slide does not advance when the timeline ends. The user has to click on a "home" button to advance to the menu. I could trigger the variable change on this button as well but I want the variable to change if the user navigates to another section using the left hand menu too.

Thanks

Leslie McKerchie

Hey Adrienne!

Sorry that you've run into difficulty with this. My first thought is that you may be using an icon that is actually a group of objects, which would cause you to not see the edit states option.

The easiest way to explain this is to show you, so check out this brief Peek video here.

Just let me know if you need further assistance.

Daniel Moore

Hi Rahul,

I find the best way to control changing the states of objects is to let the variable do it. I try not to attach a changing state to a button.

Also, I find the order of the triggers in the triggers panel makes a difference. For example, if a button has two triggers - one to advance the slide and one to adjust the variable - the variable trigger must come before the slide advance trigger in the order.

This is just something that works for me.

Dan