Multiple levels

0 favourites
  • 3 posts
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • Hi, I am currently trying to create multiple levels, and it is giving me some problems. Before, I get into what the problem is, let me tell what I have done till now:

    1. Layout 1 has level 1, uses Event sheet 1.

    2. Layout 2 has level 2, uses Event sheet 2.

    3. Now, in Event Sheet 1, I have a Global Variable called levelSelect, whose initial value is 0.

    4. In Event Sheet 1, On start of layout, if levelSelect = 0, go to layout Layout 1.

    4. In the events, I have an event where: If Player: On Collision with: Door :: Add 1 to levelSelect

    5. In Event Sheet 2, On start of layout, if levelSelect = 1, go to layout Layout 2.

    Now here is the problem: When I launch the game, it auto loads level 2. And if I select Layout 1 and then launch, it launches level 1, but none of the keys for movement work, nor the music plays.

    Where am I going wrong?

    Thanks.

  • Which even sheet gets loaded first depends on the project's properties.

    Also keep in mind that events only run in an active event sheet. So instead of putting the goto in the layout that you want it to go to, put it in the event that is currently running.

    So either make a lobby layout you always load after the level that then decides which layout to load next or put the send portion at the end of your levels.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It is working now. Had to change the default loading layout in Project Properties. :) Thanks!

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