How do I click through a series of objects

0 favourites
  • 3 posts
From the Asset Store
High quality sound effect pack, in the following categories: Simple, negative, pozitive
  • 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.

  • Try Construct 3

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

    Try 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)