Hi, I have tested that my method of touch activation works consistently, but it might include too many events/code. I would like to find out if there is a shorter or simpler way to activate touches so that the first object I press down and release is the only one that can be activated? (The intended action is different from the first object activated as soon as touch is down)
For example, if I press and hold down ‘play’ button with mouse/touch then drag/move touch off it then back on ‘play’, no action activation happens.
Here is my method (video demo and events) on my approach to it. This is the intended result I was looking for. The difference in the video demo and screenshots is the 3 hidden objects visible in the video I used for the cursor/touch (eg. bugbase) to show what it looks like. The blue highlightb1 is created at position button.
https://www.youtube.com/watch?v=pxX5RxCZKcg
I also used 2 scene variables,
- ‘pickno’ = 1 (only if first object is chosen)
- ‘nom’ = number of objects pressed down on before touch is released (if at least 2 objects chosen, then ‘pickno’ becomes 0
NOTE: I also delete (highlightb1) object and set ‘pickno’ to 0 if I activate an object without changing scene. I only don’t need to include this if I change scene as an action.
I’m not sure if this topic has been mentioned before, but hopefully my method is not too complex and can help GDevelop users if there is no easier/shorter way.