Pausing the Layout!

0 favourites
  • 5 posts
From the Asset Store
MM_Preloader
$19.99 USD
Various preloading features. Preload textures of entire layout, custom preloading, etc.
  • Is there any possible way to pause the whole layout and get back to it?!

    Let me make myself clear here;

    I've got a Time Global Variable in Layout 01 (The Game Level) and when I'm switching to Layout 02 (Main Menu) and then I'm trying to get back to layout 01 it's restarting the time variable and I want it to do a resume after pausing!

    Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Construct2 when going to a layout will always start it like it's never been played unless you tell it otherwise.

    For some games it will be enough to have changed global variables for it to resume where left of, but for more complicated games the state of the layout should be saved and retrieved on resume.

    If your only issue is the time variable, probably you have an event on start of layout that changes it, so you should add a condition to the on start of layout to not reset it if coming back from the main menu.

    You could do this by adding a global variable called resume and set it to 1 when going to the main menu and on start of layout check if it's set to 1, or just check if the global variable time has changed and if so don't reset it.

  • LittleStain Thanks for your feedback,I tried every possible way with the Time Scale to pause and resume the layout but nothing! Anyway I'll give your method a shot.

  • Are you sure you didn't use the Event "Reset Global Variables" somewhere?

    Because Global variables should keep their values even on a layout change...

  • yes sure even I don't have "Reset Global Variables" event in the whole layout!

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