Activate next button after 2 layers are viewed

Aug 25, 2021

Hi ELH,

I have a slide with two rectangles. Each has been grouped because they are built using bunch of stuff (rectangle, title, image, background). When the learner clicks each, they will go to layer 1 or layer 2. That all works. BUT, we don't want them to advance until they have see both layers. I have tried many times to add a next button and trigger to hide it first, but then when I try to change the state to normal, I can't select the layers or the grouped rectangles to have these be visited, because they are not buttons, I guess. I added hot spots on the rectangles, and that didn't work either (as no way to select those). I am stuck. Right now learners can advance if they do or don't click the rectangles. Thanks for your help.

5 Replies
Walt Hamilton

There is an old saying in the theater: "Anyone who puts kids or animals on the stage deserves what happens to them." That means that no matter how well-behaved, or well-trained you think they are, at some time they are going to revert to their true nature, and you can only hope it doesn't happen during a performance. The SL correlation is: "Anyone who uses groups deserves what happens to them." That means that no matter how well-behaved or how well-trained you hope they are, groups don't play nicely with anything, and especially not states, clicking on, and triggers. Sooner or later, you are likely to have problems with them.


I used a group in SL once, and it worked the way I wanted. I think it was in 19... No, wait. I'm thinking of another program, Maybe ... Well, it doesn't matter; the point is that groups don't work in SL. Pretty much you can use groups, or you can have triggers and states that work, but not both. No amount of extra work is too much to avoid the problems that come with groups.

Of course, by now, I know your experience leads you to agree with me, so I'm just preaching to the choir in hopes it can help steer somebody else away from the siren allure of groups.

As to your problem, no amount of extra work is too much to avoid the problems that come with groups. Fortunately, there are a lot of ways to do what you want without groups.

1. Maybe the simplest, now that you have created everything, is to right click the group, and export it as a picture. Then delete it, and insert the exported picture, which will work with clicks and states.

2. My preferred method is to create everything as one object.  Start with a rectangle, fill with a background, then right click to add text to it. It's still one object, and only lacks the picture, which can be added as per #3 below.

3. A somewhat more complex method is to add the shape, then create the next element, like the image. Copy the image, edit the states of the shape, and in the Normal shape, paste the image. End editing, and repeat for all the elements of the former group. It ends up looking the same, but is considered only one group.

4. Create the entire group in a graphic program (which will give you a lot more flexibility and options), save it, and import it into SL

All of these methods allow you to have one single object with all the elements you want, and none of the problems associated with groups. You can create and modify their states any way you want.

 

 

 

Judy Nollet

Hi, Laura,

Walt provided some great alternatives for avoiding groups.

Here's another way around your current problem: use variables and conditions to change the state of the Next button. 

  • Create a T/F variable (default value = False). For this example, let's call it Layer1Done. Add a trigger on that layer that adjusts Layer1Done to True when the layer's timeline ends. 
  • Create a T/F variable (default value = False). For this example, let's call it Layer2Done. Add a trigger on that layer that adjusts Layer2Done to True when the layer's timeline ends. 
  • On the base, add these triggers:
    • Change Next to Normal when Layer1Done changes with the condition that Layer2Done = True
    • Change Next to Normal when Layer2Done changes with the condition that Layer1Done = True.

Both triggers are needed so the user can view the layers in any order. The conditions ensure they have completed both layers.

Below are links to the User Guide info about conditions and variables. It's well worth the time to learn about them, because they provide the real power in Storyline.

Walt Hamilton

I may have forgotten the simplest solution to groups:

Put all the elements there, then cover the whole mess with a shape with an outline, filled, with transparency set very high (in effect an invisible shape). Then attach all the triggers and states to that shape.

My suggestions will all work for layers on one slide. Judy's suggestion will work for layers on one slide. If the learner travels to another slide, then you must use Judy's suggestion of variables.