Sequence of left Clicked events

Just started using Construct 2? Post your questions here

Post » Mon Aug 17, 2015 1:44 pm

Hello;

In the event file things are supposed to execute from top to bottom--however, "On left button clicked" event executes before "On left button clicked on Object" event--regardless of the order of the two click events in the event file.

I want to skip the "on left button clicked" event if an object is clicked. I was going to set a flag in "on left button clicked on Object" to do this--however they execute in the wrong order.

Is there a way to do this?

thanks for your time.

yours winkr7
B
34
S
8
G
3
Posts: 169
Reputation: 3,305

Post » Mon Aug 17, 2015 2:18 pm

if I understood correctly...
Image
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Mon Aug 17, 2015 2:44 pm

From the manual:
Since triggers run upon an event happening, they aren't checked in top-to-bottom order like other events. This means the ordering of triggers relative to other events is not important (except relative to other triggers of the same type, since triggers still fire top-to-bottom).

Since the triggers aren't actually the same type, you don't know the order they will be called.

Ref: https://www.scirra.com/manual/75/how-events-work
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Mon Aug 17, 2015 3:29 pm

Thanks Korbach and blackhornet. I think I do it by picking objects that overlap Mouse.X and Mouse.Y inside the "on left mouse clicked" event.
B
34
S
8
G
3
Posts: 169
Reputation: 3,305


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests