changing a number when a layer is visited

I'm guessing this may be something obvious and relatively simple but here's my problem. I have a slide with picture. Students have to find and click on a hazard (hotspot) which will take them to the layer which has  a more detailed description of the hazard. They then close the layer and find the next hazard etc. What I want to do is have a 1/5, 2/5 etc, each time one of the hazards is identified. Can anyone suggest the easiest way of doing this?

4 Replies
David Tait

Hi Paul,

I've attached a SL file showing one way of achieving this. Demo here: https://www.4-pt.co.uk/samples/test/counting-with-variables/story_html5.html

I have a hotspot that has a trigger attached to it. When clicked the hotspot adds 1 to a variable called 'counter'. The value of the variable is shown on screen via a variable reference. The button stops adding to the variable once it has reached 5.

Paul Brennan

David/Mike,

 

Thanks for getting back to me. I have literally just managed to work it out. Although I suspect the example you have forwarded is a simpler option.

I created a true/false variable for each layer with the variable set to false.  I shortened each layers timeline to a second and another trigger to change the variable to true at the end of the timeline. 

The layer would then only add 1 on the first visit (i.e. variable false). I changed the number using states. 

I really appreciate the suggestions