Forum Discussion
Change state of object on base layer trigger
Hi all,
I am trying to add a trigger to layer 1 that says "Change state of (object on base layer) to (specific state) when the user clicks (object on base layer)." I can select the object for the Action, but not for the When. On the layer properties, "Prevent the user from clicking on the base layer" is not checked. There is nothing on layer 1 that covers the base layer objects. The base layer objects change to the hover state when hovered over from layer 1. What am I doing wrong?
Thanks!
- WaltHamiltonSuper Hero
Since the clicked-on object is on the base, the trigger that takes action when it is clicked must be on the base. Whether the layer is showing when it is clicked is immaterial.
If you want the action to happen when it is clicked only if the layer is showing, that's a different matter.
- NardaButler-62dCommunity Member
Hmmm. So I can add a T/F variable to the layer and then put the trigger on the base with the condition that layer_1 variable = T?
- WaltHamiltonSuper Hero
You can, but then you also probably have to change the variable when the layer closes. A far simpler option is to put an invisible shape on the layer that falls over the base object, and attach the trigger to it. Use a filled shape, with no outline and a transparency set at least 95%.
- NardaButler-62dCommunity Member
And then I lose the hover effect on the base object, correct?
Thank you for the specific answer regarding triggers for objects on different layers. And on a holiday no less!
I'll sort it out without continuing to try what cannot be done!
- WaltHamiltonSuper Hero
You can add the same hover state to the shape, or your idea with a variable will work, too.