How do I can stop the player click somewhere ?

Get help using Construct 2

Post » Tue Apr 01, 2014 11:37 pm

Hi it seems like i have some little trouble :

1/ When the game stop and i click everywhere it keep lossing lives.

2/ My Lives variable, upon i reset the layout is set to 2 instead of three.

It seems like the problem is from my On Any Touch Start action. But i have no clue how to fix that.

Thank's again for your answer, here is my event.

Sorry for my english, not my native language. Hope you understand.
You do not have the required permissions to view the files attached to this post.
B
2
Posts: 8
Reputation: 166

Post » Wed Apr 02, 2014 8:04 am

Well I couldn't see anything wrong with the bit of code you have posted so I gave it a try and it appears to work OK (see attached capx - also there is a second method in it that you might prefer - to try it deactivate the group "method1" and activate "method2")

So, I guess, there is something else in your capx that is causing you problems ?
You do not have the required permissions to view the files attached to this post.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Wed Apr 09, 2014 8:19 am

Hey sorry for the delay of reply, was in holiday :3

I think when i implement both a method in my game, same problem here is a screeshot of the full event.
You do not have the required permissions to view the files attached to this post.
B
2
Posts: 8
Reputation: 166

Post » Wed Apr 09, 2014 8:20 am

Thank's again for you help!
B
2
Posts: 8
Reputation: 166

Post » Wed Apr 09, 2014 7:35 pm

can you post a link to the capx ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Wed Apr 09, 2014 7:50 pm

I haven't looked at the capx, I'm on mac right now. A solution to prevent click I always use(when programming any game/app, no need to be in construct), is to have a global variable canClick, at any click/touch, first thing I do is to verify is canClick is true and only if so continue to what needs to be done. This way you cna easily block any clicks setting the variable to false
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Tue Apr 22, 2014 8:02 am

Sorry for the late post!

I have figure out the problem and now it work ! Thank's for the answer.
B
2
Posts: 8
Reputation: 166


Return to How do I....?

Who is online

Users browsing this forum: Bootfit, Huemerson, jorgmaquoi and 5 guests