How do I get signal/wait for signal to work consistently?

0 favourites
  • 5 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • I've been using Construct 2 for about 5 years now, and have never really needed to use the wait for signal action until recently. Now that I am, I've noticed it's really, really inconsistent. Sometimes a signal simply won't be received at all. It's completely random when this happens, though if it happens, it does so every time without fail. Would there be an explanation and solution for this? I will note that I've been using them within functions. Does that happen to mean anything in relation?

  • Do you mean you are using signal and wait for signal within the same function?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you mean you are using signal and wait for signal within the same function?

    No, I'm using them in different functions. I'll wait for signal in one function, call another, and have that one send the signal once it's done. I'll typically do this multiple times per function using different signals.

    For example I'll have one main function that calls several separate functions all with their own task, and I'll have each send a signal once they've concluded to tell the main function to continue. I can confirm that when a signal has failed to be received, that the actions directly before and after the signal being sent play out just fine. The signal itself is either ignored somehow, or doesn't send.

  • Problems arise if there are no waits anywhere in these functions, if you send a signal and wait for signal within the same tick I've seen issues. Using 'wait for previous actions to complete' under some of the actions has also resolved this issue for me as I think that possibly waits for next tick.

  • Problems arise if there are no waits anywhere in these functions, if you send a signal and wait for signal within the same tick I've seen issues. Using 'wait for previous actions to complete' under some of the actions has also resolved this issue for me as I think that possibly waits for next tick.

    That appears to be exactly right. It was all about the waits. Now that I've put a short wait before the signal, it works just fine. As far as I'm aware, adding a wait completely fixed the issue. Thank you so much!

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