How do I click through a series of objects

Get help using Construct 2

Post » Sun Dec 14, 2014 12:21 pm

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.
Posts: 5
Reputation: 210

Post » Sun Dec 14, 2014 4:19 pm

I made a capx that solves your problem. Im sure there is better way to do that but for now it may be usefull. ;)
You do not have the required permissions to view the files attached to this post.
Posts: 14
Reputation: 2,324

Post » Mon Dec 15, 2014 8:04 am

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 :)
Posts: 5
Reputation: 210

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot], zenox98 and 14 guests