Two objects on top of each other

Discussion and feedback on Construct 2

Post » Sat Aug 06, 2011 7:53 pm

Sorry again for all the posts but I couldn't find the answer to this one either.

I have two objects on top of each other, when I click on the object on top, the object on the bottom gets the click as well. Is it possible to have the object on the bottom not get the click?

Here's what I'm trying to do, I have a sprite that covers the entire screen. On top of it I have 5 smaller sprites in various areas, when you click on the smaller sprites, they will become visible. However, if you click on an area that is not one of the smaller sprites you will lose a health. Clicking on the smaller sprite is making the sprite visible, but it is also deducting the health from the bigger sprite that is covering the screen.

B
6
S
1
G
1
Posts: 52
Reputation: 829

Post » Sun Aug 07, 2011 4:24 pm

Are they different kinds of sprite? You could change your "bigsprite" click event to something like this:

+ On bigsprite clicked
+ Mouse is not over littlesprite
-> ...actions...
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Sun Aug 07, 2011 7:38 pm

Hi Ashley,

Thanks for the response!

I'm still a bit confused. I am not finding the options you mentioned on the previous reply
B
6
S
1
G
1
Posts: 52
Reputation: 829

Post » Sun Aug 07, 2011 9:14 pm

[QUOTE=daveryaaziem] Hi Ashley,

Thanks for the response!

I'm still a bit confused. I am not finding the options you mentioned on the previous reply[/QUOTE] Negate mouse over event
B
18
S
4
G
1
Posts: 413
Reputation: 2,512

Post » Sun Aug 07, 2011 9:44 pm

To negate it, right click on the "mouse over object" event (as in ashley's example "Mouse is over littlesprite") and choose "invert".
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon Aug 08, 2011 1:33 am

Hi Kyatric,

Thanks for that tip!! I'm still having a problem. It doesn't seem that I can add a mouse action to a mouse event.

I think event would be

On bigsprite clicked -> Mouse is not over littlesprite

but that just doesn't seem to be possible, unless I'm still missing something.
B
6
S
1
G
1
Posts: 52
Reputation: 829

Post » Mon Aug 08, 2011 2:52 am

I think you're missing sub event.

Make your event "On bigsprite clicked"
Right-click it "add a sub event"
Make that sub event "Mouse is not over littlesprite"

For these kind of basis I strongly suggest you to take a good look at the beginner's guide to construct2 even if this isn't the kind of game you want to do as of now.
The tutorial just goes over all the basic functionalities of C2, and you'll need to know them. :)
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon Aug 08, 2011 3:47 am

Thanks!

I actually built that game twice, and I do remember a brief mention of sub events, but nothing in depth. Is there anyplace that gives a description of every function and feature. I've been to the tutorial on sourceforge, and though it is good, it isn't quite for the novice. I grasp thing pretty quickly when given in lamens terms. The tutorial says there is a ink that has an explanation of everything, but that link is broken
B
6
S
1
G
1
Posts: 52
Reputation: 829

Post » Mon Aug 08, 2011 2:35 pm

We're still working on the Manual, which will be a reference of every feature in Construct 2. Hopefully it won't be much longer before it appears.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Mon Aug 08, 2011 11:47 pm

Thanks Ashley,

You guys have been very helpful!!
B
6
S
1
G
1
Posts: 52
Reputation: 829

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests