How do I Cover a button?

Get help using Construct 2

Post » Sat Jun 04, 2016 7:54 am

Hi all, maybe could be a stupid question... but I can't see an easy solution to do that

I made 2 sprites, one is a button, and another one is a cover of the button.

I would like to delete the button if I press on it, but the problem is that I can delete a button if is behind of the cover button... and this is a problem.

I try different solution to do this, but without any success:

http://www.umbriadesign.it/example/problem.capx

there is any method to do this easly? I need to use different layer, so the Z order will be a problem... I want like:

if the button is behind the cover_button doesn't remove, but if it's in front yes.... there is any condition to do that

thank you very much
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Sat Jun 04, 2016 8:51 am

why dont you just destroy the button after click on it ?
I mean when it get cover,,,Then just recreate after than as u want
B
13
S
5
G
4
Posts: 119
Reputation: 3,353

Post » Sat Jun 04, 2016 1:57 pm

fathijack1999 wrote:why dont you just destroy the button after click on it ?
I mean when it get cover,,,Then just recreate after than as u want


if I click the button that is behind the cover it will destroy, and I don't want this...I wan't that if you click on the covered button doesn't have to do nothing...

I need more layer with different button and cover... I tried to make 2 variables to both of the sprite that said in what layer they are, and if you click on the button behind the cover with different layer that doesn't delete but does'nt works...

the problem is that, if the cursor is over something... doesn't works properly because the cursor first is over to the cover, and not in the button...the button is behind, so doesn't make any sense to me... @Ashley or I'm wrong?

Thank you very much
B
21
S
9
Posts: 298
Reputation: 2,967


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 45 guests