0 Favourites

How do I click through a series of objects

  • I'm having difficulties with clickable objects spawned on top of a clickable objects firing their events.

    For example; I have a box that when clicked should spawn a circle and delete its self. Clicking the circle should spawn a diamond and delete the circle. Clicking the diamond should spawn the original box and delete the diamond.

    The problem I'm having is that clicking the first box applies the click to the circle and then the diamond resulting in the box appearing to have not changed.

    I ensured the order was backwards in the event sheet and this results in the box turning into the circle correctly but it cannot turn the circle, and then into the diamond, but from the diamond it skips the box and moves to the circle (because the event for the box click is after the diamond).

    I hope that makes sense - quite confusing I know.

    I also tried setting a variable for the state of the left moues button to see if I could emulate a mouse up condition after each click on the object - that didn't work.

    I was hoping there might have been a mouse event that is for Mouse Up so the click would only fire when the mouse has been pressed and released over an object, or some way of preventing mouse clicks to apply to all objects under the cursor (so only the top most is affected).

    Thanks for any help, I'm quite new to C2.

  • I made a capx that solves your problem. Im sure there is better way to do that but for now it may be usefull.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • That works great. I'll give that a try.

    I didn't realise you could have an action without an event, as in the last line that just has the Set Click to 0.

    The method I finished with yesterday before receiving your example was very close

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,124
karshinkoff's avatar
karshinkoff
Unread hot topic
70 12,743
Joannak's avatar
Joannak
Unread hot topic
167 14,484
DMT2005's avatar
DMT2005