Touch and mouse clicking (SOLVED)

Just started using Construct 2? Post your questions here

Post » Sun Jan 31, 2016 4:01 pm

Hello, I would appreciate any help or explanation why the Touch and Mouse objects perform the way they do. Here is what happens:

See picture below and this is for a cookie clicker type game.

when using;

1) Touch object only: Works, but the mouse click does not register fast enough.
2) Mouse object only: Mouse click works perfectly! but no touch?
3) Both Touch and Mouse object: Works, but mouse click registers twice.

Image

What happens when clicking on the player object, both the score and resources increase by 2 not 1 and on the enemy object the score only increase by 1 like it should. I think the enemy object works because it gets destroyed once clicked/tapped on. If I destroy the player object after it is clicked/tapped on then the score and resources only increase by 1 like they should.

Any suggestions or solutions?

Thanks!
Last edited by Shrewd on Sun Jan 31, 2016 6:29 pm, edited 1 time in total.
B
3
Posts: 3
Reputation: 181

Post » Sun Jan 31, 2016 4:25 pm

Change event 2 to just use Touch: On touched object.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Sun Jan 31, 2016 4:34 pm

blackhornet wrote:Change event 2 to just use Touch: On touched object.


When I do that the mouse click does not register faster enough. I am trying to achieve a click/tap the object as fast as you can to collect more resources/score.

Thanks
B
3
Posts: 3
Reputation: 181

Post » Sun Jan 31, 2016 5:51 pm

Try just replacing Tap with On touched. If that doesn't work, you can use "System: Is on mobile device" to pick whether to use Touch or Mouse.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Sun Jan 31, 2016 6:29 pm

blackhornet wrote:Try just replacing Tap with On touched. If that doesn't work, you can use "System: Is on mobile device" to pick whether to use Touch or Mouse.

I figured it out. Turned off the Use Mouse Input on the Touch Object, now it works. Thanks for the suggestion on System is on mobile device though, I will look into that option as well.
B
3
Posts: 3
Reputation: 181


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests