Multiple levels

Get help using Construct 2

Post » Sun Oct 20, 2013 1:40 pm

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.
B
5
S
1
Posts: 38
Reputation: 839

Post » Sun Oct 20, 2013 1:52 pm

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.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Sun Oct 20, 2013 2:11 pm

It is working now. Had to change the default loading layout in Project Properties. :) Thanks!
B
5
S
1
Posts: 38
Reputation: 839


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests