tap on only the upper sprite

Discussion and feedback on Construct 2

Post » Tue Feb 14, 2017 1:01 pm

Dear All, could you help me in the following situation:
I have two sprites:
1) Background
2) My character
For sure, my character is above the background

I've implemented two event handlers: "tap on background" and "tap on character"
BUT, when I taps on character, the handler "tap on background" also fires :(

Is this a way to prevent start all "tap on...." exept the sprite i just tapped?

Thank you in advance,

Andy
B
9
S
2
Posts: 34
Reputation: 603

Post » Tue Feb 14, 2017 7:04 pm

Separate layers.
Check layer "on tap".
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,613

Post » Wed Feb 15, 2017 1:11 am

@AndyRevenko

You can add another condition to the tap on background to say "Touch is not touching player"

(you do that by saying "Touch is touching Player" and then Invert that).
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Sun Feb 26, 2017 12:58 pm

GamerGon wrote:Separate layers.
Check layer "on tap".

Thanks! :)
B
9
S
2
Posts: 34
Reputation: 603

Post » Sun Feb 26, 2017 12:59 pm

AllanR wrote:@AndyRevenko

You can add another condition to the tap on background to say "Touch is not touching player"

(you do that by saying "Touch is touching Player" and then Invert that).

Thanks! :)
B
9
S
2
Posts: 34
Reputation: 603


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests