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

Get help using Construct 2

### » 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
7
S
2
Posts: 10
Reputation: 997

### » 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
101
S
39
G
134
Posts: 5,591
Reputation: 85,520

### » 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
7
S
2
Posts: 10
Reputation: 997

### » 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
101
S
39
G
134
Posts: 5,591
Reputation: 85,520