Is there a way to make it so that one action can't happen unless another one does?

Hello! I’m currently working on an escape room ish type thing.
One of my features is so that when you click on an object it will give you a hint. But the issue at the moment is that I’m worried that the player might click on an object too early and it’ll get spoiled.
My question (like above) is that is there a way so that I can code it in a way that if this action doesn’t happen, then the other one can’t?

please respond if u know how to!

Hi @birbbrain, you can make a variable lets call it stepOneComplete, and set this to “False”, then in the first “on click event” set this variable to “True”.

In the second “on click event” put all of the code thats inside of the yellow block (not the yellow block itself) into an “If block” with the stepOneComplete as its parameter.

Now whenever the second object is clicked only when your variable is “True” (and therefore only if the first item has been clicked) will the code inside the second block go off, else it will just ignore it.

The other option is to put the whole second “on click event” block inside the first one; This will make it so that only after the first item has been clicked will the second “on click event” initiate. Though this gets messy if you do it for more then two events.

Hope to have helped, good luck!