How can I disable touch/clicks?

I have a boolean variable named “Processing”. While Processing is True, the player should not be able to interact with the screen. Can someone tell me the best way to do this, please? I’ve tried hiding the cursor, but the player can still click/touch the screen. I’ve tried creating a transparent sprite on a layer above the play area to cover it all, but the player can click/touch through the sprite and still interact with the play area. I’ve looked through the Actions and Behaviors, and I just don’t see how to accomplish this.

Thanks.

A Processing = False condition in the touch/clicks event should help.

I dont work with Touch, but isnt it possible to deactivate the behavior for the time you need to?
image

I have the boolean, but when Processing is False, what action will deactivate touches/clicks?

Deactivate what behavior? I currently don’t have any behaviors added.

You can’t disable it, but you can prevent it from running.
I don’t know what and how scene interactions you have but the boolean condition must be added to every button etc.

1 Like

Ah okay, yes - so the solution is what Jack wrote.
Looks like you must lay hand on every condition…

It’s a chain reaction game where you click/tap one object, that object rotates, bumps other objects (all duplicates of the original object), then those objects rotate, and so on. So, once the player clicks/taps one of the objects, they shouldn’t be able to click/tap any of the objects again until the chain reaction has finished. I have the boolean “Processing” set to True once the chain reaction begins, but I don’t know what action will prevent the player from clicking/tapping when the condition is true.

Are you saying I need to use the boolean on every object as an instance variable?

You would just need to have the Boolean check as the first condition then you can put as many subevents as you want. Each subevent depends on the preceding event (that it’s a sub of) being true. You would only need to check once although, you could break it apart to fit your logic and readability.

For the final action to trigger, all conditions need to be true

or

The drag tile and mouse up event groups are even. They both need Processing to be true but they don’t rely on each other.
image

Subevents behave just as if all of the conditions were in the first event. These are both the same.

The second version would only be beneficial if you wanted to do something after each step.

The condition “Processing” = False in the click event prevents clicking if “Processing” is True.