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

Get help using Construct 2

Post » Fri Jul 25, 2014 7:33 pm

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.
B
11
S
2
Posts: 86
Reputation: 1,001

Post » Fri Jul 25, 2014 7:43 pm

What I did in your case was, (we have the same situation @kbtbc! :D, 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.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Fri Jul 25, 2014 8:02 pm

@DuckfaceNinja Oh cool ... I just knew I was missing something simple -- thanks!
B
11
S
2
Posts: 86
Reputation: 1,001


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, David181, fens, Piggly and 11 guests