help with levels

For questions about using Classic.

Post » Sat Dec 19, 2009 11:57 pm

hi i am a newbie at construct and im wondering if somebody can make a tut how to make levels you know if you kill all the enemis you complete the level and then you start another level. thanks :D
B
1
G
3
Posts: 5
Reputation: 835

Post » Sun Dec 20, 2009 12:30 am

Check out deadeyes platform tutorials. That basically covers what you're asking. But be sure to use the version it was made for.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sun Dec 20, 2009 2:09 am

[quote="Lost my Keys":2s3d88kj]Check out deadeyes platform tutorials. That basically covers what you're asking.[/quote:2s3d88kj]

Actually, no it doesn't. I don't have any tutorials on how to switch levels yet.

You need to make another layout for your second level. Then basically all you need is a condition (like comparing the number of enemies to 0) and the System action "Go to Layout." It's not too hard.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Dec 20, 2009 6:57 am

To make that more clear, if you have 10 enemies, make a variable called "#ofEnemies" and set it to 10 and every time an enemy dies subtract 1. Then make an event that says when #ofEnemies equals 0 goto the next layout.
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Sun Dec 20, 2009 7:06 am

What about the .Count expression? You access it with the "Get number of objects" in the expression editor, or just type ".Count" after your object name.

System: Compare: Enemy.Count = 0

No need for a private variable, unless you want something more complicated.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Dec 20, 2009 4:09 pm

[quote="deadeye":2cj0p4hs]What about the .Count expression? You access it with the "Get number of objects" in the expression editor, or just type ".Count" after your object name.

System: Compare: Enemy.Count = 0

No need for a private variable, unless you want something more complicated.[/quote:2cj0p4hs]


thanks :P
but now how do i make like another level . when i make a new layer its the same map and everything and when i delete something from the layer the thing i deleted delets in the other layer to. :?
B
1
G
3
Posts: 5
Reputation: 835

Post » Sun Dec 20, 2009 4:21 pm

You need to make another layout, not another layer. Right-click the layouts folder in your project list and craete a new one.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Dec 20, 2009 4:55 pm

[quote="deadeye":27suw13h]You need to make another layout, not another layer. Right-click the layouts folder in your project list and craete a new one.[/quote:27suw13h]

ok i did a new layout as you told me to and it worked but now im expericing another problem :cry: when i create another layout the event sheet is gone .. and i cant copy the event sheet from the other layout. what can i do besides doing the event sheet all over again.. ?? thanks for the help so far
im sorry if im bugging you.
B
1
G
3
Posts: 5
Reputation: 835

Post » Sun Dec 20, 2009 7:44 pm

You should put all of your game code in a separate event sheet and then include the event sheet for each layout. You can create a new event sheet by right clicking the "Event sheets" folder in the project bar and clicking "Add event sheet". This is the event sheet where you should put your non-level specific game code. Then, to include the event sheet, right click in your layout's event sheet and click "Include event sheet". From there you can include your gamecode event sheet. Here's an example of an included event sheet:

Included event sheet

Hope that helps. :)
Moderator
B
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Mon Dec 21, 2009 4:21 am

It's also possible to set different layouts to use the same event sheet, without needing to use "include event sheet" on each.
B
3
S
1
G
3
Posts: 82
Reputation: 1,189

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests