How do I get how many milliseconds the player has touched?

Get help using Construct 2

Post » Sun Jun 21, 2015 3:13 pm

How do I get how many milliseconds the player has touched the screen? So I can account for triple taps, or long tap followed by a double tap, etc.
B
6
S
2
Posts: 10
Reputation: 972

Post » Sun Jun 21, 2015 6:14 pm

In the simple case set a variable to the current time "on touch". Then you can get the duration of the touch from "is touching" with time-start_time.
B
94
S
33
G
123
Posts: 5,453
Reputation: 78,469

Post » Mon Jun 22, 2015 1:49 am

R0J0hound wrote:In the simple case set a variable to the current time "on touch". Then you can get the duration of the touch from "is touching" with time-start_time.


There isn't a millisecond system variable is there?
B
6
S
2
Posts: 10
Reputation: 972

Post » Mon Jun 22, 2015 4:54 am

you can use "time" which gives you seconds. On the plus side is it's a decimal number so you can get a time of 0.456 or something. To get milliseconds you can multiply it by 1000.
B
94
S
33
G
123
Posts: 5,453
Reputation: 78,469


Return to How do I....?

Who is online

Users browsing this forum: dop2000, mikewalton206 and 19 guests