How do I disable touch after a certain action has occured

Just started using Construct 2? Post your questions here

Post » Sat Jul 26, 2014 5:21 pm

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!
B
9
S
1
Posts: 51
Reputation: 644

Post » Sat Jul 26, 2014 7:14 pm

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
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Sun Jul 27, 2014 11:04 am

TheDom wrote: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 :)
B
9
S
1
Posts: 51
Reputation: 644

Post » Sun Jul 27, 2014 12:38 pm

It's usually suggested to upload the capx..
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sun Jul 27, 2014 1:28 pm

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.
You do not have the required permissions to view the files attached to this post.
B
9
S
1
Posts: 51
Reputation: 644

Post » Sun Jul 27, 2014 3:46 pm

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.
You do not have the required permissions to view the files attached to this post.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Sun Jul 27, 2014 4:34 pm

TheDom wrote: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.
You do not have the required permissions to view the files attached to this post.
B
9
S
1
Posts: 51
Reputation: 644

Post » Sun Jul 27, 2014 5:48 pm

Updated it so it works..
You do not have the required permissions to view the files attached to this post.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Jul 27, 2014 6:21 pm

LittleStain wrote: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.
B
9
S
1
Posts: 51
Reputation: 644


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 6 guests