Event Order: Synchronous/Asynchronous

0 favourites
  • 7 posts
  • I was under the impression when an event triggered it would start top down synchronously. So if multiple conditions were true it would take care of the first before moving onto the second.

    But from this simple test all events nested on the same level are fired asynchronously:

    Result:

    This is not a complaint as it will work great in most situations now that I know. But is there a way to have something like this performed synchronously?

    A 'case: switch' is basically what I am looking for. Else and ElseIf won't work as multiple or none can be true. Signal and function would be more tedious than necessary and would have to create a line if none is true that it would fire the signal/function.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ugh, can I not post images?

    On event start:

    Test1 : wait, append text

    Test2: wait, append text

    Blank test: append text

    The last will append before the first two.

    . . . but if you are capable of answering the question I doubt you needed that

  • Wait does not block. You would have to include each subsequent test also as a sub test. You mean 'case:switch' with a fall-though? Otherwise 'case' is just a simpler elseif.

  • From the manual:

    [quote:3aq2zl13]Wait

    Wait a number of seconds before continuing on to the next action or sub-events. Other events continue to run in the meantime. See also the tutorial on How to use the System 'Wait' actions.

    https://www.scirra.com/tutorials/56/how ... ait-action

  • Wait does not block. You would have to include each subsequent test also as a sub test. You mean 'case:switch' with a fall-though? Otherwise 'case' is just a simpler elseif.

    Yes, with fall-through.

    But apparently my example is flawed due to using wait. This was not a post directed towards wait.

    If the waits were replaced by an intense calculation that took even fractions of a second would they go in order? Or would they all fire at once?

  • Each intense calculation would need to finish before the next starts.

    So.... they do go in order, but your actual system frame won't update until the entire event sheet has run through, so they would all appear to fire at once, when everything has been calculated and your system is ready to display that frame.

  • That makes sense - that is what I originally expected.

    Thanks oosyrag

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