So, Ok I did write a big post but it was getting out of control so to keep it simple
I have a test scenario ….
- TWO or more touches ALREADY TOUCHING
- One of the touches SLIDES over a button
- Test if that touch is the first touch
- If yes activate button
My thoughts on solving are,
Recording uid of first touch only...
OK this Works fine.
However then going on to check if that touch ID is touching an object, unless it is on initial touch, appears to not be possible with construct events. (unless you do something fancy with invisible sprites and collisions but that is out of scope here.)
I’m hoping someone can prove me wrong.
So the two ways that you might try are.
This does activate when a touch SLIDES onto the button
BUT the action will only pass the touch ID of the LAST TOUCH touching the SCREEN when something touches the Button. It will not specifically pass the touch ID of the last touch that has touched the Button. For example, even if the last touch touching the screen is not touching the Button this action will pass that last touch ID. So it will work only in a single touch scenario it will not work in a multi touch scenario.
The other method to try would be
This basically works , and records the correct touch ID each time, BUT.... it is only triggered when the touch directly touches the button at time of touch. It will not trigger for any touch that is already touching the screen then slides over to touch the button.
So as far as I can see, (without using invisible sprites to check collisions). It is not possible to track if a specific touch touches a button if that touch is already in touch.
(Try saying that after a few pints)
ps I’m sorry I cannot upload any google drive files directly here as I am at work
But I have already posted a test file on github, ready to go, if anyone is interested in having a crack (no invisable sprites NOT allowed you can swap out is touching for on touched to see issue)
github.com/Scirra/Construct-3-bugs/issues/2330 (change the extension to c3p)