How do I quit and move to menu layout to restart game?

0 favourites
  • 4 posts
From the Asset Store
ready made menu you can download this one or just follow my tutorial to make it yourself
  • I have 2 layouts - Menu and Game

    Global variable



    I have a pause button that calls a function which will then create

    pause menu




    For resume and restart event, it works correctly.

    Upon resume touched - call function -destroy pausemenu

    -set timescale to 1.0

    -set pause to 0

    -set isplaying to 1

    Upon restart touched - - call function -destroy pausemenu

    -set timescale to 1.0

    -restart global variables to default

    -restart layout

    However, my quit event dont seem to be going back to the first menu layout

    Upon quit touched - - call function -destroy pausemenu

    -Go to Menu

    -restart global variables to default

    Can someone advise if there is something wrong with how I am putting in the events?

    I basically just want to quit the 2nd(game layout) and go back to the 1st(Menu layout).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What IS happening when you "touch" quit? I didn't quite glean that.

  • you might want no to use timescale pause while moving objects, meaning that will make your events not to be read, since the whole game is in pause , i wold use a boolean, and toggle it when a menu is pressed, if toggle is true, then move the menu into screen, if is not invert toggle , then keep menu out of screen, and in order for you to not press items in the menu and in game, just add a function for events to happen when the menu toggle is inverted that way all actions will happen when the menu is not shown. timescale basically freezes the game entirely you cannot exclude and specific object to not be paused, that's why u got this issue! and sadly i wish there where a option for it but there is not!

  • Noted on your suggestion on using boolean. I will test it out. Thanks!

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