on hold touch

Get help using Construct 2

Post » Fri Jan 16, 2015 11:49 am

Hi there,

i want to make my character use a certain ability when -on touch hold- button used. If he only touches the button for a moment, there is already a different action asigned to the same button. So basicaly i would like to do 2 actions on one button. When pressed and held and then single touched {which i already have done}.

I tried the command on hold on hold gesture but it doesn't seem to work...
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Fri Jan 16, 2015 12:01 pm

Use 'On touched object' & 'Is touching object'
With those two condition of touch just enough to perform different action on same object. I use them plenty.
ImageImage
B
111
S
51
G
24
Posts: 787
Reputation: 23,394

Post » Fri Jan 16, 2015 12:22 pm

Ah thanks that works ;). However it also triggers the 1st ability when pressed. I would have to add another condition to trigger the first one or the second one
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Fri Jan 16, 2015 3:48 pm

You can add timer to the condition. Define how long object still in contact since object was touching.
For example touching is last more than 2 secs then set it to hold state.
If touching was less than 2 secs then set it to tap state.
ImageImage
B
111
S
51
G
24
Posts: 787
Reputation: 23,394


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 42 guests