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

0 favourites
  • 10 posts
  • 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

  • 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.

  • 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.

  • "Object A is overlapped by Object B" is the same as "Object B is overlapping Object A".

  • Its same thing like Magistross said above.

  • 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.

  • 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?

  • 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 ?

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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)