How do I can stop the player click somewhere ?

0 favourites
  • 7 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • 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.

  • 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 ?

  • 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.

  • Thank's again for you help!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • can you post a link to the capx ?

  • 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

  • Sorry for the late post!

    I have figure out the problem and now it work ! Thank's for the answer.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)