Time Scale and Wait help please

0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi,

    I am trying to get some dialogue in my game that pauses the game while it is being displayed, here is the code:

    <img src="https://dl.dropboxusercontent.com/u/15657176/codebit.png" border="0" />

    It pauses the game by using "Set time scale to 0" and it correctly displays the first dialogue part. Unfortunately it then stops at the wait statement and never goes on to the next line, despite my having set the time scale of the dialogue text box (which triggers the event) to 1.

    I assume therefore that the Wait statement must be system specific (IE linked to the global timer) rather than event or object specific.

    So my questions are 1) Is this expected behavior? and 2) Any ideas how to make this work as expected?

    Cheers.

  • Hi RattyRat,

    You're experiencing problems because you've added the wait action after setting the timescale to zero.

    Setting the timescale to zero is like stopping the clock, so the system cannot measure the 2 second wait action, because the clock has stopped.

    You can set each individual items/objects timescales to zero, so you could try that instead.

    Hope that helps you to understand your problem a little better.

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alternatively rely on the wallclocktime system expression, which still increments at 100% timescale regardless of what the game timescale is.

  • Blacksmith - Thanks, I had realised that but had thought that setting the objects timer back to 1 might have fixed it.

    Ashley - Cheers - that helped me fix it, I now set a global variable called dialogtimer to wallclocktime + 120 in the above event, then have a second event that checks for wallclocktime >= dialogtimer and adds one to the DialogueID when it does.

    Thank you both for the swift replies, much appreciated.

    RR.

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