How to add a variable to change multiple object's states

Aug 14, 2019

Hi,

The scene I have is this:

Object 1 is a screen shot of a PC screen. It has 2 states = Show and Hide. Object 2 is a screen shot of a button. It too has 2 states. When user clicks object 2, the state for that object must change as well as the state for Object 1. Then when they click Object 2 again, it should change the state of Object 2 back to it's original state as well as it's own state. I know this requires a variable (or 2), just don't know how. I haven't used variables much.

Sorry, i cannot add attachments. 

16 Replies
Randy Hill

Deirdre, it depends on what the 2 states are of Object 2. If the button is just a selected and normal state then you can have a trigger that says change state of object 1 to show when state of object 2 is selected. And then create another trigger that says change stat of object 1 to hide when state of object 2 is normal. Something like that. again, it depends on what your states are for object 2. 

Deirdre Sherman

I cannot upload due to security blocks. 

Object 1 = PC screen. It has two states: (show & hide).

Object 2 = screenshot of a toolbar button to control screen. It too has two states (show & hide).

When user clicks Object 2, the state of object 2 changes from "show" to "hide," AND the state of Object 1 changes from "show" to "hide" as well.

I'm not using the "button" feature, just a screenshot of a button. I assume I'd have to create a variable so i can write a rule that says, "change state of Object 1 when Object 2 is in X state" and vv - correct? That's the thing i don't know how to do...

How do i make it so user can click button multiple times and change the states of both objects back and forth?  

Randy Hill

First off, anything can be a button, you don't have to use the button feature, it is just a matter of creating the right states or at least the ones you need. 

Second, and this is what is confusing, if you are hiding both objects at the same time what is the user supposed to do, or is this a one off that you just want the users to click object 2 and hide both objects?

Deirdre Sherman

OK, so when user clicks an object titled "Hide Toolbar", it changes the same object to one titled "Show Toolbar." At the same time, clicking that object is also changing the screen in the background to show a different state of the same screen, one without a toolbar. So i am not hiding objects, just changing their states. Sorry, i hope this helps explain what I'm trying to do. And I want the user to click the "button" many times to change the states back and forth.

I have now created two triggers to prompt the changes of states to both objects. But that doesn't allow the user to "re-play" the objects. 

I found this thread, but they didn't post the solution. https://community.articulate.com/discussions/articulate-storyline/how-do-i-make-it-so-that-an-object-with-a-trigger-to-change-the-states-of-other-objects-can-be-clicked-multiple-times

 

Diane Fallier

When a user clicks on an object/image you can set a trigger to change the state of any object on the screen. I use this when I have an image and a box that are both clickable to jump to another slide. I change the state of the object that wasn't clicked to visited. The one that is clicked is changed to visited automatically. So, you don't need to use variables to change the state of any object based on clicking an object.

If you are changing back and forth between show and hide, the trigger will need a condition that checks the state of the object to determine if it should do the operation. For example, a trigger that changes the state of the object to hidden if the current state of the object is normal.

Let me know if you need help creating these triggers/conditions.

Deirdre Sherman

Hi,

I have created two triggers to prompt the changes of states to both objects. So now i need the second part. Is it the conditions that allow the user to visit the state over again? I have 2 states on each object (show toolbar and hide toolbar). Do i need a Visited state as well? 

Yes, I would appreciate some help with conditions in this scenario. Thank you.

Deirdre Sherman

It only works once. I added 2 triggers:

"Change state of screen to "No Toolbar" (Hide Toolbar) when user clicks Button if Button state = Normal (Hide Toolbar)," and "Change state of screen to Show Toolbar when user clicks Button if state = Show (Show Toolbar)." This is in addition to a trigger to change the button itself to Show/Hide when user clicks button. 

It works fine once - does exactly what i want it to do, but will not work a second time. The slide is very busy, i have dozens of triggers for other buttons, and everything is on a timeline with voice over. Does the fact that the timeline is moving play a role?

 

Deirdre Sherman

Randy,

I did finally get it to work - i think i was just staring at the logic for to long :). Thank you!

I do have another small issue: First the user hovers over above mentioned button and see a message telling them to click. When they hover i have a rule that says, "Change state of outline to normal when user hovers over button" to highlight that button. The user then clicks button, but unlike the other toolbar buttons over which the user hovers (using hotspots) - the issue is that hotspots have the feature "Restore on Mouse Leave" which objects don't have. So i created a trigger to "show outline when user hovers over button" but i can't get the outline to not show when user hovers over the other objects, or stops hovering over that button. There is no rule to "Change state of outline to Hidden when user hovers over other object..".  do you have any ideas?

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