Wining the game (Pass to the the next level)

Get help using Construct 2

Post » Fri Jan 13, 2012 7:39 pm

Hi everybody, I started playing with the basic intro tutorial and everything appears to be pretty straightforward, but I have some problems.

1.- How do I win or complete the level?
I am trying something like this so that when I reach 1000 points, I can jump to the next level (other layout) but it doesn't work.

On end of layout > System>Set Score to 1000
                            go to > Layout 2

Note: I can only go to the other new blank layout when dieing and pressing the space bar.


2.- How to jump to next Level? (Kind of the same but more specific on changing the level design)

It's a good rule to use a layout for every level or should I use another option?

like a background in a different layer?

Thank you for reading! I been trying this all night yesterday and today but no success.
B
3
G
1
Posts: 6
Reputation: 937

Post » Fri Jan 13, 2012 7:40 pm

You could have a invisible sprite, or visible.

Then have a on collision event, which you'll then fire your go to layout action.

The layout has no end unless you give it one
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Fri Jan 13, 2012 7:41 pm

Oh also, you could have layers for each level but its not advised. Could cause you problems later on in your game. Stick to layouts its more sensible
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Fri Jan 13, 2012 7:45 pm

You need to add a condition to trigger the end. So using your example.

Every tick -> Compare Variable 'Score' => 1000

go to > Layout 2dsarchy2012-01-13 19:48:22
B
14
S
3
G
5
Posts: 41
Reputation: 3,490

Post » Fri Jan 13, 2012 7:51 pm

Oops i never read you full post silly me.

Yeah dsarchy is right, you need to compare the variable to see if the score is grater or equal to 1000, if it is then go to next layout.

Tip:

You might want to make a global variable called TargetScore,

Then every tick compare that target score to the current score.

Its easier to change ect the, all you have to do is on start of layout set target score to - (x)
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Fri Jan 13, 2012 8:19 pm

And like
Make LayoutNumber variable
like this
Compare Variable TargetScore = 1000
--add 1 to LayoutNumber
--Set TargetScore 0
----If LayoutNumber = 1
------ Go to Layout 2
----If LayoutNumber = 2
------ Go to Layout 3
----If LayoutNumber = 3
------ Go to Layout 4
And vice versa



B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Fri Jan 13, 2012 9:48 pm

Wow!! WOW!! Thank you guys for your support !

I think it toke me more time to think what I was going to ask, than all of you replaying.

What a great community!!!

Thank you very much to all, I really appreciate your time.
B
3
G
1
Posts: 6
Reputation: 937

Post » Fri Jan 13, 2012 10:19 pm

your welcome

Construct2 has a great community, some really smart people. Yann is the mannnnnn, Kyatric is a beast, weishups pretty suave and many more users.

I enjoy contributing to the community and hopefully you will too soon
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Sat Jan 14, 2012 9:42 pm

o_o...
well you can also do a
[code]Got to layout (by name): "Layout "&LayoutNumber[/code]
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 20 guests