0 Favourites

When is trigger actually run ? (at which order)

  • I have a question about trigger,

    when is trigger actually run ? or at which order ?

    Let say my Event Sheet looks like this:

    Event A
    Event B
    Trigger 1
    Event C
    Event D

    so what is the order when player doing "Trigger 1"

    Is it at the beginning of frame ?

    <font color=blue>Trigger 1</font>

    Event A

    Event B

    Event C

    Event D

    Or is it at the end of each frame ?

    Event A

    Event B

    Event C

    Event D

    <font color=blue>Trigger 1</font>

    Or it could happen at any order ?

    Event A

    <font color=blue>(Trigger 1)</font>

    Event B

    <font color=blue>(Trigger 1)</font>

    Event C

    <font color=blue>(Trigger 1)</font>

    Event D

    <font color=blue>(Trigger 1)</font>

    Or even run parallel with the regular event :P ?

    Event A <font color=blue>(Trigger 1)</font>

    Event B <font color=blue>(Trigger 1)</font>

    Event C <font color=blue>(Trigger 1)</font>

    Event D <font color=blue>(Trigger 1)</font>

    Thanks a lot in advance

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I'm confused what you mean by trigger?

  • just a regular trigger, for example, player clicking on an object, pressing key, etc:

    For example:

    <img src="http://www.scirra.com/images/articles/simpleevent.png" border="0" />

    or

    <img src="http://www.scirra.com/images/articles/unreferencedobjectevent.png" border="0" />

  • It can happen at any time. Each trigger runs at the moment it is fired, which can be during an event (e.g. like when the Function object triggers an event from an action) or before/after the event sheet runs. I deliberately try not to say specifically when triggers fire, because it could also be different across browsers (for things like input triggers). The only example you gave which is never used is parallel: if a trigger fires during events (as in the function example again), the running of events is paused, the trigger runs, then it resumes from where it left off.

    Is it important to you when a particular trigger fires?

  • Is it important to you when a particular trigger fires?

    hehe.. not really I'm just curious, just trying to understand how C2 works and how the events flow.

    thanks a lot Ashley.

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
0 Favourites
[plugin] Out Run
105 21,556
andreyin's avatar
andreyin
Unread hot topic
48 9,077
Jase00's avatar
Jase00
Unread hot topic
41 3,218
Napelazam's avatar
Napelazam