Disable Mouse Button/ Touch Down?

Hello.

Is there anyway to disable mouse button/ touch down? For example: I click on a sprite and it activates its action. After the mouse/touch is released I want the mouse/touch to be disabled for that sprite. So the user can only click/touch the sprite once. I believe I could do this with a inverted option, but I don’t know how to disable the mouse/touch.

Thank You
InsertCoin25

You don’t need to “disable” the mouse click. Just use an object variable to check if a specific sprite has been clicked or not.

When create the sprite (if it’s created dynamically at runtime) or at the start of the scene (if the sprite is created in the design window) load a variable in each one of this objects/sprites (let’s call it “clicked”) and set its value to 0. If the user clicks the sprite then execute its actions only if clicked is equal to 0 and as part of its actions set clicked to 1.

This way each sprite can only be clicked once.

2 Likes

Thank you erdo!! This makes perfect sense. I was thinking along the lines of a variable, but figured there would be a disable mouse/touch condition or action.

Thank You
InsertCoin25