how i goto next level

Get help using Construct 2

Post » Tue Jan 17, 2012 2:42 am

i make a game but i don't know how i go to next level
B
7
S
2
Posts: 22
Reputation: 972

Post » Tue Jan 17, 2012 4:08 am

Super simple. Click on the project tab, under layout create a new layout (default = Layout 2) then setup a collision detect or anything you want to complete the level (timer etc...) in Layout 1 and then go to the events sheet and set the system go to layout "Layout 2" once you have hit the collision/time ran out...

Here is a real quick version. Level change on the ball falling out of layout 1 then layout 2 launches.
Basics level change

Here is a more complex tutorial on saving variables...
How to series - 'In Game Shop'shadowedsol2012-01-17 04:17:06
B
9
S
1
G
3
Posts: 19
Reputation: 1,628

Post » Tue Jan 17, 2012 4:22 am

Thank You Very Much
B
7
S
2
Posts: 22
Reputation: 972

Post » Fri Feb 15, 2013 2:36 pm

This works for me. Sometimes.
There is some kind of bug that sometimes randomly sends the player to another level then set in the eventsheet.
B
4
Posts: 2
Reputation: 781

Post » Fri Feb 15, 2013 3:11 pm

@teebee are you using custom layout Names or default names. I have seen many times when keeping the default Names where is easy to put the wrong name in a reference since they are all so similarly Named.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Fri Feb 15, 2013 4:30 pm

What if the layout is almost the same for all the levels.
Is it somehow possible to just include another event sheet when you go to the next level?

How will copying the layout say 50 times for 50 nearly identical looking levels influence the file size and memory used?

B
9
S
4
G
1
Posts: 102
Reputation: 2,274

Post » Fri Feb 15, 2013 7:18 pm

Ok So I have been stuck on a similar problem for 3 weeks.

I want a 'level up screen'. one where you Pick something, and then it goes back to the original layout. After making some minor modifications, to the demo I added a second layout. The goal of this layout was for the game to pause, and the user to pick a second weapon upgrade to use, and then going back to the original Layout.

I started by having a second event sheet for the upgrade page. Didn't work. I tried putting it on the original event sheet. Didn't Work. I tried having both. Didn't work. I stopped using the default OK button and made my own. Didn't Work. I downloaded the chalkboard example that is provided somewhere else here on the forums that has a single stage and a Main Menu, and the code looks exactly the same. I checked to make sure that I wasn't re-triggering the event by automatically adding 1 to the Score. I even tried removing the changes to the game time. Didn't Work.

Finally. I am posting here.
Here is a Link to my Google Drive File.
https://docs.google.com/file/d/0B1KYrkkdLVFBZFVvWmduZW9ScUU/edit?usp=sharing

Thanks for Any Help!Wootah2013-02-15 19:19:29
B
1
Posts: 3
Reputation: 231

Post » Fri Feb 15, 2013 8:36 pm

@Wootah , Derp to you , sir :P

You forgot to assign the eventsheet to a layout
To do that , left click on the layout , and you should see an event sheet option , In your case it's set to (none)

Set it to *Whatever-You-Want* and all should work as intended !
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Fri Feb 15, 2013 9:00 pm

Wow! That was super simple!
Thanks. I am not sure where where I would have picked that up, but that works.

But a follow up question, the state of the First Layout doesn't look like it is saved. So this won't work like I thought it would in terms of a pause screen (in such a case as local variables storing monster health for example). Is there a simple way to do this?
B
1
Posts: 3
Reputation: 231

Post » Fri Feb 15, 2013 9:35 pm

@Wootah A seperate layout for your pause screen may not be as good of an idea, but if you do want to store some info, you can use the web storage object. But that won't save the layout state. You can save variable values though and use those to do things on load.

You may want to simply pause the rest of the layout and create a sprite or object for your level up screen. Let them pick, assign the values based on their choice to variables, then hide the level up object and unpause the layout...
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Next

Return to How do I....?

Who is online

Users browsing this forum: GSquadron and 25 guests