Let variable decide whether to show a layer

Jan 30, 2023

I have layers that are shown when cuepoints are reached on the base layer timeline. Once the layer has been shown, i don't want it to be shown again, even though the student may rewind.  This can tend to get the layer out of sequence with the audio. This is also the reason why i have to turn off the seekbar for this particular slide. But i do need a pause and rewind button, so have created my own. I have variables that are adjusted when the timeline exceeds a certain time stamp. For the first layer, it works and it will only show the layer the first time, through that part of the timeline. For all the rest of the layers, the software ignores the variable and shows the layer again. I have tried everything. the result is always the same. I have put the variable right on the base slide and can observe that it is changing (and being ignored). i have attached a file, but made the audio silent, as i don't want to share all the content.

2 Replies
John Cooper

Hi Matthew

If you copy the variable display box onto each layer it's easier to see the value of 'alreadyshown' as you progress through each stage. It's important to understand how the base layer timeline works.

I think what is happening is this - you are setting 'alreadyshown' to a value of 1 at 68 secs so when you reach the trigger at cue point 84.56 secs to display ' forgotten to duplicate' the value is 1 and the layer displays - The timeline on the base layer is still running.

'alreadyshown' is set to 2 at 87secs while you are viewing the 'forgotten to duplicate' layer. You exit this layer and jump back 15 secs you are jumping back in the timeline into the 'forgotten to display' layer' because the clock was still running on the base layer. Although the 'alreadyshown' variable is 2 you are in the 'forgotten to display' layer because you jumped there NOT because the conditional trigger was executed.

If you pause the timeline on the base layer when you enter the 'forgotten to duplicate' layer you will see the difference. Jumping back 15 secs after you exit the layer will put you back before you displayed the layer. This is not intended to solve your problem - just to demonstrate how the timeline works. In this case the 'alreadyshown' variable is still 1 so the layer would be shown again. If you jump back before 68 secs your trigger at 68 secs will reset the variable to 1 and the layer will still be shown again!

Have you tried setting a true/false flag inside each layer to say that layer has been viewed and then using this in the conditional test to trigger the display of that layer? - this might be a simpler approach avoiding the problem that you are resetting the variable in the timeline. You might also want to consider pausing the base layer when you enter each layer and restarting it when you exit. Working out where you are on the base layer timeline would be a lot easier... and it would avoid you 'jumping' into a layer.

I hope that makes sense?

 

Matthew Lapeikis

I'm not sure you are correct. i think you missed where i reset the variable at cue point 10 to 68 seconds. easy to miss because the cue points are out of order numerically (doesn't seem to be an easy way to change the cue point numbering this far down the road). and i can could clearly observe that the variable was correct and being ignored. however, by taking your recommendation and setting the variables on the layer instead of the base, the problem was corrected.  ive spent three days trying to solve problems with layers on this slide and another. I've done this once in the past as well. my evaluation is that if you want player controls, whether integral or custom, just create different slides and forget the headache of layers. there is always some combination of actions the student can take that result in a condition you would like to avoid.  then when you fix that condition, your fix creates another problem. they may all be solvable, but the amount of time it takes is difficult to justify.  the same holds true for trying to return to the timeline on a previous slide. there always seems to be a sacrifice, an undesirable condition that can occur; it may not be likely to occur, but is a possibility.  and if its possible, a student will stumble into it. So, rather than returning to a slide, just duplicate the slide, or a portion of the slide and keep always moving forward in the slide sequence, never back. it is so much simpler and less time consuming. there are some triggers that could be added that would solve some of this. for example, the ability to jump to a cue point on a previous or different slide would be helpful, but currently that option does not exist; you can only jump to a cue point on another layer of the same slide.  thats my two cents. i only took the time to write it so that it might help someone else in the future. ignore the OCD and go for the quick fix. like me, you probably don't have the time and may not have the hair (to pull out).