Forum Discussion
Object state "if" condition being ignored on show layer trigger in drag and drop?
Hi all!
I have a drag and drop interaction where I'd like the draggable answer objects to each show an explanation layer the first time the user clicks on them, then stop showing that layer (so the user doesn't accidentally open the explanations while dragging and dropping).
I thought this would be a simple "if" condition on my draggable objects; set the object to Visited when the user clicks them (which is working), then make sure the object only shows the explanation layer if the object state is Normal. That didn't work (still shows the layer on subsequent clicks), so I tried basing the condition on the object state NOT being Visited. Also didn't work. Screenshots of triggers below.
Do these conditions just silently fail when used in a drag and drop interaction? Is there something else I'm missing? .story attached below.
1 Reply
- NedimCommunity Member
You don't need triggers to set the 'Visited' state. It's a built-in state that activates automatically when a button is clicked. Remove any triggers that manually set the "Visited" state, and keep only those that show a layer when a button is clicked, but only if the button's state is "Normal".
Keep in mind that, in this case, the learner will be able to open the layer as long as the button hasn't been clicked—meaning it can be dragged and returned to its original position, but the layer will still open unless the button is clicked at least once. To ensure that the buttons are clicked and layers opened before they can be dragged requires a different logic and setup.
Related Content
- 4 months ago
- 10 months ago
- 11 months ago