0 Favourites

Manage between touch and mouse? ... and OR/AND

  • I have read the trick to detect input which uses a menu input to determine weather or not the user is using touch, and only show the touch controls with touch.

    This is pretty cool, however, if you have the touch properties set to "Use mouse input" it will also register a click as touch. So, I disable "use mouse input" property. -- so now I need to manage every touch event for buttons as well. I didn't see an action about setting the "use mouse input" property to change it during events, so it's either on or off for the whole game.

    It's no biggie to add an 'Is touching' condition to my menu to handle both mouse and touch. I make an 'OR' block. However, my click event was already conditioned with 'AND' (the default) ... I can either 'OR' all conditions in the block, or 'AND' them.... not AND/OR in the same block -- which seems unfortunate because I have a few menu options, and one is a large event (it sets up the board) -- duplicating the events just to handle both touch and mouse seems like overkill ...

    Any advice here is kindly appreciated.

  • What I did in your case was, (we have the same situation kbtbc! , but found the solution last week) I nested the AND block as the sub event for the OR block.

    This has become my good practice since I can cut out large amount of event in my current by handling OR and AND in separated block.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • DuckfaceNinja Oh cool ... I just knew I was missing something simple -- thanks!

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