Changing State of object using a variable

Oct 24, 2012

I have a course that has a main navigation screen with branching off that screen. When a student completes a section (that is set up as a seperate scene) it navigates back to the main navigation page so they can choose another option. On the bottom of the screen I have objects that change color to show the section has been completed. I wrote a variable with a value of 0. When the user clicks the next button on the last section page it changes the variable to 1. I then have a trigger to change the state of the object to show the "completed" version. when the variable is = to 1 or greater. Problem is the object is not changing states to show completed. Any body else have an issue like this??

Thanks!

23 Replies
Annie Jean

Hi Rich,

You probably need to define the action triggering the state change. In your example I would probably write my trigger like this :

Change state of object looking complete / when Timeline Starts of object Main navigation slide / If Variable section complete Equal or greater to 1

Often, this is the "When" that is misunderstood, it needs to be an action.

Hope it helps and have a nice day!

Annie

Rich Lesser

Annie,

Thanks for the reply, but it still does not work. I have the trigger established on the navigation page that when the variable changes to =or >1, the state should change. We even added a text box that displayed the variable value on the navigation page and the variable changed correctly to show =1, but the object state still did not change...

Thanks

Annie Jean

The problem is the When...

When do you want to change to be made? When the user comes back to the main navigation slide or, if you prefer, when the timeline of the main navigation slide starts.

Storyline doesn't look at the variable at all time, you must tell it to look at the variable to see if it changed at a precise moment, that's why you identify the moment or action that makes it look at the value of your variable.

Hope it helps!

Phil Mayor

A variable is a way of storing information.  The when variable changes is a slide specific trigger because it is listening for the variable to change.  If you want something to change on the slide you are on when a variable changes you would use that trigger.

If the variable does not change on that slide, then you need to find another way to change the object, this is because the variable did not change on this slide.  Annie's suggestion to use when timeline starts is correct because this trigger fires every time the slide loads.  

Deniz Olcay

What happens if a slide has a "jump to" trigger and also a "change variable" trigger? Does this mean that the change variable trigger wont work on that slide?

For example, I made a simulation, and when the user clicks next, it adds 1 to a variable, but it also jumps to a particular slide depending on what the variable is.

I'm also having some similar trouble. I set it up as you mentioned. Have the "when timeline starts" ------> Display State A --------> if Variable is =1. But sometimes it just comes up blank on the screen, and when i hover over and click on the object, it pops up. Ever encountered this issue?

Tammy Wise

I have read through this post and still cannot make my project work correctly.  I have the Next button set as disabled when the timeline starts.  I want the user to click on each chess piece to navigate to different slides.  After clicking each, the Next button should be normal.  I have tried several things and it just isn't working.  Any ideas would be greatly appreciated!

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