How do I pause code execution

0 favourites
  • 4 posts
From the Asset Store
Two levels with two sistem Wave. with Source-code (.c3p) + HTML5 Exported.
  • Hi guys,

    Is there a way to completely pause the execution of code for a certain amount of time unlike the 'pause' action which causes other sub-events to continue to execute?

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could put the code in a group and deactivate the group for the pause-time..

    or ofcourse use variables and use them as condition..

  • Hmm interesting.

    If I pause and deactivate the group, will the code continue executing where it left off when I unpause and reactivate the group again?

    variables as conditions could get tricky since I need to pause the game for about 0.5 seconds in the middle of several loops.

    Thanks for the quick reply!

  • Events sheet are read top from bottom. So the tick you activate again your group, the whole group actions will be executed starting with the very first on top.

    Perhaps you also want to have a look at the new "Wait for signal" system action that will allow you to only have a certain event run when a certain tag/signal is used/sent.

    It sounds like you have an issue in your events organising and you should detail precisely what you're looking to achieve and provide/attach a capx so that we can help you "cut" and organise the events in the most efficient way.

    Without your project to ponder about, it's guesses and shots in the dark.

    I hope this helps.

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