Disable touch in layer

Get help using Construct 2

Post » Tue Apr 30, 2013 6:30 pm

Hi

Can I somehow disable touch in layer= (Game)
because I want to drag and drog another sprite in layer= (Extra)

Cheers
B
23
S
12
G
10
Posts: 323
Reputation: 7,382

Post » Tue Apr 30, 2013 6:39 pm

could you be a little more descriptive
B
39
S
10
G
7
Posts: 514
Reputation: 9,426

Post » Tue Apr 30, 2013 7:28 pm

Sure ..

Touch Is touching SpriteA (this in layer = Game)

Touch Is touching SpriteB (this in layer = Extra)

Since I want SpriteB to drag around It is in conflict with SpriteA

Hope you see my point...
If I somehow can Disable touch events in layer = Game

Regards
B
23
S
12
G
10
Posts: 323
Reputation: 7,382

Post » Tue Apr 30, 2013 7:31 pm

I'm still a little confused, but can you segregate your touching actions by using SpriteA's UID or testing a sprite's unique variable?
B
32
S
7
G
8
Posts: 312
Reputation: 8,467

Post » Tue Apr 30, 2013 7:45 pm

Well .. in other words

If I touch SpriteB
the (Touch Is touching SpriteA)should be disabled

:-)

B
23
S
12
G
10
Posts: 323
Reputation: 7,382

Post » Mon May 06, 2013 7:47 am

Hi again..


Still havent solved this..

Ive done this small sample file of the problem.
Hope that somebody would give it a look and have Idears
how to get it running

( when dragging the black box to drog in the yellow..
the blue ones are also affected by touch event )


https://dl.dropboxusercontent.com/u/22406377/D%26D.capx


Cheers
flemming
B
23
S
12
G
10
Posts: 323
Reputation: 7,382

Post » Mon Jun 17, 2013 8:49 am

Hi,

I need exactly the same thing. Have you solved the problem yet?
B
4
S
1
Posts: 5
Reputation: 810

Post » Thu Jan 30, 2014 11:33 pm

Looking for the same thing and suggested the new feature here: http://www.scirra.com/forum/topic84907_post496513.html#496513


As a work around I created a global variable that is either 1 or 0 and then for all touch events (a pain I know and thus the feature request) I have an additional condition that the global variable has to be 0 where as my unique events I dont want touch to work I set the variable to 1 and when I do want touch to work I set it back to 0.
B
14
S
2
Posts: 39
Reputation: 689

Post » Sat Feb 27, 2016 3:43 am

I had the same problem. My solution was to put the button events in two diferent groups. So, when one group was activate, the other was deactivate, and vice versa. This way, you can't touch two overlapped buttons at the same time. The buttons were also in two different layers, so I could change its visibility too.
B
4
Posts: 3
Reputation: 206


Return to How do I....?

Who is online

Users browsing this forum: SpartCrafter and 23 guests