Clickable objects and their Z order

0 favourites
  • 10 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hi! Thanks in advance to help me and sorry for my english: it isn't my mother tongue...

    I'm wondering if the "Z order", or the "layer order", affect the clickable objects.

    For example, I have a "Y sprite" on top of layer and cover an "X sprite" in another below layer. Why if I click of the "Y sprite", also the action pair of "X sprite" is running? I tried with another condition like "If Y is visible", etc, but doesn't work...

    Some tips?

    Thanks very much!!

  • You can pick an object in events by which is on the top or bottom of the z order, if that's what you're trying to do.

  • Thanks. The problem is when I run the preview of layout, therefore is a problem of Event/Action. In the Layout view I can pick the different object.

  • If you post your capx someone can probably explain to you more easily.

  • Here is the capx:

    https://drive.google.com/open?id=0B_Dxi ... mc0MnRsV1E

    If I "tap on" the green button, nothing happens.

    If I disable the event number 3 in the event sheet, the green button works.

    Why?! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Event 2 always sets Event 3 true.

    Its is not so that the 'on tap' in event 2 steals the 'on tap' in event 3.

    They are triggers. Triggers fire when that event, what they are designed to catch, happens.

    Every condition that starts with 'on' is a trigger.

    So if you have a thousandth 'on tap gesture', they all trigger when the 'tap' happens. And since you make event 3 always true (by setting the layer visible in event 2, and by having a fullscreen button), event 3 will trigger always when event 2 triggers.

    Tinkering about a solid solution for you.

  • This what you look for ?

    https://www.dropbox.com/s/9uhqpeq5ubod6 ... .capx?dl=0

    Thanks, it's working perfectly!!! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> I'm also understanding the trigger system (more or less!).

    Judging from your capx, it seems rather easy. ..I hope I'll be able to continue by myself!

    Thank you very much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Besides the 'triggers', use 'else' to keep events from making the next event true.

    A simple example:

    If a = 1

    ___do this

    ___set a to 2

    If a = 2

    ___do that

    ___set a to 3

    If a = 3

    ___do something else

    ___set a to 1

    Do you see that the first event 'a=1' sets the second event always true ?

    Use "else" to avoid this. So ....

    If a = 1

    ___do this

    ___set a to 2

    else

    If a = 2

    ___do that

    ___set a to 3

    else

    If a = 3

    ___do something else

    ___set a to 1

  • Your explanation should be integrated in the Manual. Thank you for the massive help!

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