Including Event Sheets - Event priority

0 favourites
  • 5 posts
  • Hello!

    I've a quick question to ask you guys about the priority of events when using Event Sheets : )

    Let's say I have my Main Layout, and Main Layout uses Main Sheet.

    Now, I have another Event Sheet called ANOTHER.

    This is how the Main Sheet looks:

    This is how ANOTHER event sheet looks:

    My question is: how will the Score variable behave?

    In my opinion it should go:

    0 - initialization

    999 - Include: ANOTHER -> On start of layout

    0 - Main Sheet -> On start of layout

    Am I right? Will events from ANOTHER complete before events from Main sheet do?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In normal events, the main event sheet is read from top to bottom, if an event sheet is in the way, the event sheet is read (all is normal)

    However, with triggers like on start of layout, further testing showed included event sheets will trigger always before the main event sheet, this is only for trigger events AFAIK

    In your exemple, Score should be 0 I think (the debbuger could help you see the value it takes at the end of the tick too)

  • So basically my conclusion was right : ).

  • itzathis

    Yes, but if include:ANOTHER was at the bottom of the event sheet instead of the top, the result would not have changed, where logically it should have I think (since this is how triggers seems to work with includes).

    My suggestion is to have the main event sheet have only includes and non trigger conditions, that way, no weird trigger order relative to the main event sheet has to be done. main event sheet from top to bottom, without anything else

  • It's easy to test this yourself with events and see how it works. But yes, the engine fires triggers from the most-deeply-included sheet first, firing on the top level event sheet last. Other events are read normally in top-to-bottom order, and includes are run where they appear in the event sheet.

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