How do I Disable mouse click.

0 favourites
  • 10 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • When the score is 100, i need to disable mouse so the player cannot click anymore until the layout is restarted.

    PS: i do not wish to deactivate any groups.

  • Compare variable..

    Var_Score = 100....Mouse Destroy

  • uff really, is it that easy? ,what a beautiful software we have here. Thanks Korbaach

    Updated: lol, you are joking. No destroy for mouse, ahaha hate you

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • you could hide mouse cursor when your score is 100 by Mouse set cursor to None

  • cursor is gone but you still can click

  • i guess there is no other way than deactivating groups :-/ , too bad

  • I take it this is for your shooting game?

    Easiest way is create a variable global or instance and call it "canclick". Then on your mouseclick for shooting add the condition "canclick=0". When it's game over or score>100 set canclick to 1. That way you can no longer shoot because "canclick" is now 1.


  • i did exactly as you said and it works like a sharm. BUT big problem. Your system works only when you play the game like a normal person.. But if you start clicking like crazy it somehow breaks and not working anymore and the game continues , and the restart layout not working as well. I will post a video

  • It doesn't work as you expect it in your game because what I gave you is just a small example of what you wanted it's up to you to properly integrate it into your game.

    In a couple of minutes I made it unbreakable and so it restarts properly.


    Sorry if I sound harsh at the top it's not meant to be but no one can make an example that works perfectly for a game when they have no idea how it works.

    Hope the new version helps

  • I sent you Pm with my Capx. So you know exactly what is happening and also see the code, Thank you for your time

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)