Can i make condition like "Object X is overlapped by..."?

Get help using Construct 2

Post » Tue May 23, 2017 2:31 pm

Hi guys!

I'm making a game, where's mechanics/feature based on covering/overcasting objects by other objects. Just like in "solitaire". So I want to find a way, how to check if Object A is "overlapped" by another object? Because for now, it'll be the only way to verify correct sequence and complete the level..
Help :D
B
4
Posts: 34
Reputation: 268

Post » Tue May 23, 2017 3:24 pm

This is easy, add a new event, for condition select the object you want to check collision, go next, and under the collision tab select overlapping another object click next and select your second object.

Image
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Tue May 23, 2017 3:32 pm

imhotep22.. hm i know very well about that function/condition "is overlapping another object" ;) But it's now exactly what i want.. I want to make action "Object A is OVERLAPPED" by another/Object B - it make little difference.
B
4
Posts: 34
Reputation: 268

Post » Tue May 23, 2017 3:47 pm

"Object A is overlapped by Object B" is the same as "Object B is overlapping Object A".
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Tue May 23, 2017 4:42 pm

Its same thing like Magistross said above.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Tue May 23, 2017 4:54 pm

It sounds like you'd want to compare the object's zorder to see if an object is in front of or behind another object.
B
92
S
32
G
109
Posts: 5,294
Reputation: 70,999

Post » Tue May 23, 2017 8:19 pm

Yes R0J0hound! That's exactly what i want. Ok, you're right guys "overlapping" is the same when object is on top or bottom.. so i want to check when it is on the top and cover another object and check when it is on the bottom, and its "behind" another object in zorder. Is any way to make a condition that will check it?
B
4
Posts: 34
Reputation: 268

Post » Thu May 25, 2017 1:26 pm

Ok. I've got full version of C2, and there is available an option "Edit Z Order" in object parameters. But how to make the condition, that will check, which object is on the top, and which, at bottom in that z order? Can anyone help :D ?
B
4
Posts: 34
Reputation: 268

Post » Thu May 25, 2017 4:32 pm

You can use the event condition pick bottom/top to check if the object is on top of the z-layer.

Image
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Thu May 25, 2017 5:07 pm

I tried that pick top/bottom conditio, but it doesnt work...

I made simply test with 2 objects:
1. Event: Condition: left click on Object_A > Object_A move to top
2. Event: Condition: left click on Object_B > Object_B move to top

So i can choose which object is on top by clicking one of them.

And event like this:

Condition: Object_A pick top instance > set Object_A.Y + 1

So Object_A should keep moving while it's on the top on the layer. But it's moving down to the screen even if its at the bottom ;/ so it doesn't work correctly..
B
4
Posts: 34
Reputation: 268


Return to How do I....?

Who is online

Users browsing this forum: dop2000, Kin, Lancifer and 33 guests