Click outside the game screen

0 favourites
  • 6 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • Hello, I need to know if there is a way to determine if the user clicked outside the game screen, so I can pause the game if this happens.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Outside your game window your are not in your game ... so mouse events are managed by os and not by your code. The best is not use the mouse to go in pause mode but a keyboard input for desktop computers.

  • is just I wanted to pause the game if accidentally the user clicks out of it, for example if click on a button that is not in my game screen... I wanted it to be a global function to always pause if this happens, trying to make it easy instead of communicating to the html of the page, but I guess is not that simple :/

  • You could pause the game when the cursor leaves the window of your game, but if you clicked outside the game would need input from the html page in your case.

    Also worth mentioning, if the window (or tab) is not in focus, the game automatically pauses.

  • oh thanks KFC, I found a workaround without the html page :)

  • Ga2Z

    Sorry for bumping an old thread but what was your workaround?

    I'm currently having the exact same issue and any help would be appreciated.

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