Triggers and Variables
Apr 26, 2021
By
Jo Craig
I have a slide with three buttons that take you to three different layers when clicked. I have added a count variable to these and then a trigger to show another layer when the count reaches three.
However due to the way that triggers are ordered, the second you click on the third button its bringing up the new layer, rather than opening the layer linked to the third button.
How can I get around that? Should I be using states instead of a count variable?
Thank you in advance.
10 Replies
You could have a new button that appears on the base layer when you variable reaches 3. That way whatever order they viewed the layers in the new button will appear on the 3rd viewed layer.
Thanks Chris. Would I start off with the state of this button hidden when timeline starts, then change the state of the button to normal when the count gets to 3?
Yeah that would work.
Annoyingly it doesn't work and I'm not sure why!
It sounds like when you click that third button, it may be updating your count? If you could share your project, I would be happy to take a look and see if I can fix it for you.
Dave
Hi People. Can anyone help me?
I am trying to have a count feature added to hover and layer feature. I have one that works but the others don't.
I am not sure whether I get this correctly but I just noticed that there are conflicting triggers that are changing the same variable.
I managed to find a workaround. I used states on the button to set the starting state as hidden and then when the count got to three it changed the state to normal. This allowed the user to click on the third button and visit that layer before the button appeared with the text. Thanks for your help everyone.
Could be correct. I have looked at other peoples but cant seem to get the hover interactions to count. Any ideas on what to do??
Hi Luuk, One thing that stood out to me is that the trigger 'sets' the hazard count at 1, so each time an object is hovered over the counter 'sets' (in effect resets) to 1. To make the counter add up the found hazards the trigger needs to 'add' to the hazard count. But you will also need to figure in disabling more than one count per hazard after first visit, if not the counter will keep adding to the 'hazards found' every time a visited hazard is re-visted.