Click and destroy object only on top

Get help using Construct 2

Post » Sat Apr 07, 2012 8:57 pm

So i have 3 images, each image is clickable when i click on image image has been destroyed but when images is behind all been destroyed in one click. I wish to destroy only that which can be seen ??

my examlpe : http://dl.dropbox.com/u/44710358/click.capx

B
170
S
3
G
2
Posts: 65
Reputation: 6,057

Post » Sat Apr 07, 2012 11:32 pm

@kataryna

[QUOTE=kataryna] So i have 3 images, each image is clickable when i click on image image has been destroyed but when images is behind all been destroyed in one click. I wish to destroy only that which can be seen ??

my examlpe : http://dl.dropbox.com/u/44710358/click.capx

[/QUOTE]

I think this will help you. Now the whole thing is solely dependent on each object overlapping the next or it wont work. This is the complete opposite effect of what was happening before.

Try it move each object away from each other or just one out of place really is all it takes. They (have) to be overlapping to work.


1click_3blocks by N7Effect, on Flickr

Your Example Link (fixed) Capx Enjoy

Browser PreviewErndog2k2012-04-08 00:55:00
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Sun Apr 08, 2012 12:37 am

destroy only that which can be seen? if "seen" is that on top and all other are allways covered by topmost(no changing of z order or position) than you need this simple exemple. If they can be covered partialy (or only two covered)but also completly or not covered at all than this little bit stupid exemple may help you

...there is also possibility to dinamicaly define if is one box inside another and then check if it is behind or before and then destroy one that you need...podpathos2012-04-08 00:44:07
B
12
S
2
G
2
Posts: 96
Reputation: 1,583

Post » Sun Apr 08, 2012 12:50 am

[QUOTE=podpathos]...there is also possibility to dinamicaly define if is one box inside another and then check if it is behind or before and then destroy one that you need...[/QUOTE]

this is exactly what my example does is it not?
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Sun Apr 08, 2012 1:17 am

by "possibility to dinamicaly deffine..." I was thinking that it can be done not that I did...but here is how to deffine is one object inside another: http://db.tt/3iAGTdrypodpathos2012-04-08 01:18:21
B
12
S
2
G
2
Posts: 96
Reputation: 1,583

Post » Sun Apr 08, 2012 1:21 am

[QUOTE=podpathos] by "possibility to dinamicaly deffine..." I was thinking that it can be done not that I did...but here is how to deffine is one object inside another: http://db.tt/3iAGTdry[/QUOTE]
@podpathos
Aww I see what you mean, thats actually pretty cool, that could be used as like a proxy to like to detect enemies inside attack player sorta thing whatcha think.

Wow soo many Ideas now imagine putting a block or wedge in front of an enemies face, and using the advanced laser technique to stop on collision of like a wall or a box the players behind, so the eyes of an enemey can be simulated very well in combination. Plus the shadows and lightning technique we can make a splinter cell type game.Erndog2k2012-04-08 01:25:36
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Sun Apr 08, 2012 1:29 am

Hmm... @Erndog2k I just can not remove the last blue and it shows. So if you can see one box should be removed to give the click of a mouse.
B
170
S
3
G
2
Posts: 65
Reputation: 6,057

Post » Sun Apr 08, 2012 1:48 am

@kataryna use my second "stupid" example it is much better then Erndog2k's one
B
12
S
2
G
2
Posts: 96
Reputation: 1,583

Post » Sun Apr 08, 2012 1:56 am

[QUOTE=kataryna] Hmm... @Erndog2k I just can not remove the last blue and it shows. So if you can see one box should be removed to give the click of a mouse.[/QUOTE] you just click one after another ???

and @ podpathos

your stupid Ver. works the exact same as mine except as long as you haven't clicked top object you can't click middle and so on. In yours if u see it u can click it. In mine if an objects overlapping another like it's on top it will prevent the others from being clicked until done so in proper order.

The one difference they have is:
Mine has ORDER, yours has no Order.

But both do the same end game preventing you from clicking the object underneath.
Erndog2k2012-04-08 02:04:00
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Sun Apr 08, 2012 2:15 am

I am just joking man (remeber mario exemple)
B
12
S
2
G
2
Posts: 96
Reputation: 1,583

Next

Return to How do I....?

Who is online

Users browsing this forum: tatogame and 27 guests