How do I set a layout strart?

  • i got a menu layout with a button (start) to go the game layout. but i realized that every second i spend at the menu, the game layout is running in memory, so when i click start the game has already started and i start whit some damage on my character and the enemies are already moving and things like that

    how do i set the game layout to start running when im on in or when i click start?

  • You can prolong this by not including your main game event sheet in the start event sheet. However, you have to keep in mind the event sheet will have ran through several iterations (60 times a second) before you even see it upon a regular load. So make sure you add sufficient delay between your "on start of layout" setup stuff and your running game events.

  • When you go from the menu event sheet to the first game layout reset global variables first.

    On button clicked: Reset global variables.. Go to layout1

    That way your game starts fresh with variables set where they should start.

  • When you go from the menu event sheet to the first game layout reset global variables first.

    On button clicked: Reset global variables.. Go to layout1

    That way your game starts fresh with variables set where they should start.

    cant do that. my character selection is working with global variables... i would lose the character i selected...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Then reset the variables like time and health only at the start of the game layout.

    That only runs once and won't effect player choice variable.

  • Then reset the variables like time and health only at the start of the game layout.

    That only runs once and won't effect player choice variable.

    could be a solution but not completly, enemies are way far from their spawn point by the time i click start and play the game.

    also the player could spend minutes on the menu cause there's like 70 characters to select...

  • You can prolong this by not including your main game event sheet in the start event sheet. However, you have to keep in mind the event sheet will have ran through several iterations (60 times a second) before you even see it upon a regular load. So make sure you add sufficient delay between your "on start of layout" setup stuff and your running game events.

    how can i not include that?

    also the player could spend minutes on the menu cause there's like 70 characters to select so putting a delay wouldnt fix this...

  • > Then reset the variables like time and health only at the start of the game layout.

    >

    > That only runs once and won't effect player choice variable.

    >

    could be a solution but not completly, enemies are way far from their spawn point by the time i click start and play the game.

    also the player could spend minutes on the menu cause there's like 70 characters to select...

    70 characters to select?

    Good grief no wonder you are having problems.

  • >

    > > Then reset the variables like time and health only at the start of the game layout.

    > >

    > > That only runs once and won't effect player choice variable.

    > >

    > could be a solution but not completly, enemies are way far from their spawn point by the time i click start and play the game.

    > also the player could spend minutes on the menu cause there's like 70 characters to select...

    >

    70 characters to select?

    Good grief no wonder you are having problems.

    64 to be exact

    any solutions?

  • 1. Put all your code/events that are running too early in their own group set deactivated by default. Activate the group inside the button that launches game when character selection is finished.

    2. Second option is set your events like move/spawn, etc to condition out true a global like layoutstarted=1 and set that global as mentioned above (I do this in my space shooter in my sig).

    3. Lastly you might have to reorganize your events so the character selection stuff does not need the main sheet to include it. It simply calls start layout main when player finished selection and all selections are store globally.

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