Help with TOUCH event wanted...

Get help using Construct 2

Post » Sun Oct 16, 2016 10:45 pm

I am new at this, so excuse my ignorance and my humble questions.

I have this event --> onTouch Object --> System Create another Object.
The problem is System still creates several instances while Touch persists.
I can't add a second condition (Trigger Only Once) to this one.
I tried the Is touching Object with Trigger Only Once. I would like for it to create just one instance of the new object regardless of however I touch the screen.

I know a variable would be a solution but I am having a hard time dealing with that.

Anyone can help, please?

Thank you.
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Sun Oct 16, 2016 10:54 pm

I can't seem to replicate the issue. Uploading a CAPX would be good so we can see exactly what you're doing.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,106

Post » Sun Oct 16, 2016 10:55 pm

On touched is a trigger and naturally triggers once only. There must be a problem with logic elsewhere, are you able to post capx?
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Sun Oct 16, 2016 10:55 pm

Try using: On Tap Object
Image
B
29
S
9
G
3
Posts: 170
Reputation: 3,297

Post » Sun Oct 16, 2016 11:10 pm

plinkie wrote:On touched is a trigger and naturally triggers once only. There must be a problem with logic elsewhere, are you able to post capx?


I am using the mouse to click (test) on the touch event and it's creating several instances.
I didn't want several instances created regardless of the number of clicks. In this example, if you keep on clicking it will reproduce it until you stop.

Thanks for the help.

http://www.geocities.ws/kikoriogames/TouchTextExample.capx
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Sun Oct 16, 2016 11:12 pm

linkman2004 wrote:I can't seem to replicate the issue. Uploading a CAPX would be good so we can see exactly what you're doing.



I am using the mouse to click (test) on the touch event and it's creating several instances.
I didn't want several instances created regardless of the number of clicks. In this example, if you keep on clicking it will reproduce it until you stop.

Thanks for the help.

http://www.geocities.ws/kikoriogames/TouchTextExample.capx
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Sun Oct 16, 2016 11:13 pm

gameglaux wrote:Try using: On Tap Object



Doesn't work. Not for what I want. Thank you, though.
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Sun Oct 16, 2016 11:16 pm

Oh right I thought you meant multiple in one click. You can just use a variable as a condition like this : https://dl.dropboxusercontent.com/u/495 ... htext.capx
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Sun Oct 16, 2016 11:18 pm

I don't think I have to upload the project to XDK and install APK on device in order to test TOUCH, or do I?
I am hoping it can be tested with the mouse click.
I have read a lot from the Manual and Forums but I certainly didn't take the time to find out about that. Hoping for a quick answer here.

Excuse my ignorance. Thanks.
B
19
S
4
G
2
Posts: 97
Reputation: 2,244

Post » Sun Oct 16, 2016 11:22 pm

You could just add a condition to your touch event checking that Object.Count = 0
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,106

Next

Return to How do I....?

Who is online

Users browsing this forum: Demkamen, Yahoo [Bot] and 13 guests