How do I disable touch after a certain action has occured

  • I have this very simple project where once the player taps the screen something happens - more specifically, an object appears. The problem is, I do not know how to prevent the object from reappearing if the player decides to touch the screen again. I just need to disable that object from appearing alltogether, and allow the user to select menu options.

    Thanks!

  • Create dual conditions.

    On any Touch > Circle > Set Visible

    Circle is (X) visible

    ( (X) ) being inverted

    then make

    On any Touch > Circle > Set Invisible

    Circle is visible

  • Create dual conditions.

    On any Touch > Circle > Set Visible

    Circle is (X) visible

    ( (X) ) being inverted

    then make

    On any Touch > Circle > Set Invisible

    Circle is visible

    I am really sorry but I cannot seem to understand what you wrote? I am very new to this whole thing. Is it okay if I just upload my very simple .capx and you can put these two commands yourself?

    Thanks

  • It's usually suggested to upload the capx..

  • Here it is. Once the player taps the screen the entire action should stop and the player should be able to select whether he/she wants to restart layout and start again. I haven't created the menu buttons yet but they would obviously appear somewhere on the middle of the screen. The important thing is that the game needs to stop entirely and only the UI layout must be selectable.

    The game is in very very early development but I think you get the basic idea behind it just by playing a round or two.

    Thanks for all the help. I presume it's not too hard of a work but I just can't get my head around it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I downloaded the capx and I'm reviewing it now. This a little different than your original explanation so I want to be clear. You have conflict in your basic concept since the players cannot play the game if you just want the control panel (however you provide a selection), so you need to have or define a specific location on screen to select the control panel and stop the action.

    Am I correct in this assumption?

    Well, I think this is what you are trying accomplish. Try the attached.

  • I downloaded the capx and I'm reviewing it now. This a little different than your original explanation so I want to be clear. You have conflict in your basic concept since the players cannot play the game if you just want the control panel (however you provide a selection), so you need to have or define a specific location on screen to select the control panel and stop the action.

    Am I correct in this assumption?

    Well, I think this is what you are trying accomplish. Try the attached.

    Hey, Thank you very much for your effort. Unfortunately this is not what I was aiming for. I updated my own .capx with some more details. So, as you can see, once the player finishes the game, he/she gets the option to restart it. The yellow restart button is tappable. Unfortunately, once tapped, the game also puts the blue square on top of it, making it impossible to restart the game and just gets stuck in a loop. What I need is to somehow make touch function apply ONLY to the yellow square, and then, after the layout has restarted, make it applyable to the game itself. I hope I made myself a bit more clear this time.

  • Updated it so it works..

  • Updated it so it works..

    Oh my. Thank you so much. Works like a charm. Thinking outside of the box here, which is something that I hope I will be able to do in near future

    Thank you once again.

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