Suggestion: Layout behaviour

Discussion and feedback on Construct 2

Post » Wed Feb 22, 2012 11:23 pm

@Ashley I know it's only a two man team and you guys work hard, so I'm not expecting miracles with this suggestion. I just thought I'd put the idea forward. Here goes...

I have worked out how to use one event sheet for all my levels by having a global variable called 'LevelLayout' and every time the goal is reached I add 1 to the global variable and the same if I want to restart the current level. So currently my event sheet looks like this:





However, I was thinking, if C2 could internally assign numbers to each layout itself, in the order that they appear in the layout browser, then it would be much neater to simply have one action. For example:



So...

On object collision with Goal -> Proceed to next layout
On pressing 'restart' -> Restart current layout


Does this make sense?FredQ2012-02-22 23:24:20
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Wed Feb 22, 2012 11:40 pm

You can already specify a layout to go to by name, which would solve your problem. In your case for example you would just type in goto '"Level" & LevelLayout' and it would skip to the correct level =)
B
22
S
6
G
10
Posts: 118
Reputation: 8,005

Post » Wed Feb 22, 2012 11:50 pm

I've looked at this option but couldn't quite figure it out :(

So if I wanted to use the same event sheet for all my level layouts, how would that look?

So...

Ball on collision with goal -> (how do I go to the next level, relative to the current one?)
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Wed Feb 22, 2012 11:57 pm

In your case it would be:

Ball on collison with goal --> * Add 1 to LevelLayout
                                * Go to layout - "Level" & LevelLayout

If that doesn't make sense I can make you a capx if I have time =)
B
22
S
6
G
10
Posts: 118
Reputation: 8,005

Post » Wed Feb 22, 2012 11:59 pm

I'll have a play around with it now. Would it be a similar a thing to restart the current layout then? Just without adding the 1 to the variable?

On touch object 'Restart' --> * Go to layout - "Level" & LevelLayout
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Thu Feb 23, 2012 12:02 am

Ok, let me know if it does't work for some reason!

And indeed, it would be exactly the same except for the adding =)
B
22
S
6
G
10
Posts: 118
Reputation: 8,005

Post » Thu Feb 23, 2012 12:05 am

You know what, I think I've got it :) Thanks!!!

It was starting to get a little tedious as I got up to levels 16+. My event sheet was a mess!
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Thu Feb 23, 2012 12:07 am

You're welcome =) Glad you've managed to get it working, this way does save a lot of effort!
B
22
S
6
G
10
Posts: 118
Reputation: 8,005

Post » Thu Feb 23, 2012 1:10 am

Moved to C2 general.
Those infos shouldn't be buried/get lost in the open topics.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,805

Post » Thu Feb 23, 2012 1:14 am

@Kyatric You could add this to yours "[How do I]Frequently asked questions" list.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests