How do I have both non and continuous inc/dec counter

Get help using Construct 2

Post » Sat Oct 14, 2017 4:46 pm

Message: closeupman can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
I'm trying to allow for both a single touch(decrease/increase by one) and a touch and hold down(keep decreasing/increasing until release).
I've tried switching which event comes first but still I only get continuous to work.) Also, I want the continuous to not go so quick and tried inserting a wait, but that didn't do anything do the speed of decrease.

(I only allowed the continuous in the 'highest number' decrease button right now)

Project file: https://goo.gl/58DZ9G

Screenshot of code extract: https://goo.gl/HRuR6w

Thanks.
B
8
S
1
Posts: 13
Reputation: 439

Post » Sun Oct 15, 2017 1:07 am

Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
19
S
9
G
158
Posts: 2,386
Reputation: 84,399

Post » Sun Oct 15, 2017 1:17 am

Wow, thanks dop2000, really appreciate your help. Didn't realize it'd be so complicated. Construct 2 should have a default built in behavior for this, I would think it's a common need.
B
8
S
1
Posts: 13
Reputation: 439

Post » Sun Oct 15, 2017 2:34 am

It's not that complicated. And, on second thought, it would be better and easier to use a timer.
On click start -> change value, stop any running timers, start timer for 0.5s
On timer event -> and if user still holding the button -> change value, restart the timer for a slightly shorter time.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
19
S
9
G
158
Posts: 2,386
Reputation: 84,399


Return to How do I....?

Who is online

Users browsing this forum: ghzmxls, guannstar and 14 guests