Suggestion: Dynamic "Go to layout"

Discussion and feedback on Construct 2

Post » Sun Oct 16, 2011 2:35 pm

Hi Dev dudes!
I'm kinda missing the ability to call Layouts dinamically - by a string, I mean.

I'm trying to be a flexible as possible with my events, especially because I intend to add more levels and features later. Right now making a level selector, and even moving between levels, is proving to be a real pain.

Is it possible to add this feature in the near future?

Thanks guys!
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Sun Oct 16, 2011 3:00 pm

If there's any workaround or new official way to this, I'm all ears! :D
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Sun Oct 16, 2011 3:05 pm

You can already go to a layout by name. Is that what you mean? I don't quite understand :(zenox982011-10-16 15:07:27
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,839
Reputation: 48,279

Post » Sun Oct 16, 2011 7:03 pm

I Agree with you Gammabean. For exactly the same reasons. Having this Ability would greatly reduce the complexity of switching back and forth between many different levels. currently I'm using a global variable to set the next change. Then activating a level selector Group to check the global and load the proper layout.   it works but gets unwieldy fast, as I create more levels.
B
84
S
12
G
9
Posts: 99
Reputation: 9,508

Post » Mon Oct 17, 2011 11:46 pm

[QUOTE=zenox98] You can already go to a layout by name. Is that what you mean? I don't quite understand :([/QUOTE]

Is it possible? I don't see the option here. Maybe there's a different way to do it?




Another suggestion regarding Layouts: DUPLICATE
I used it a lot on CClassic after building a Skeleton level.

Having a hard time copying and pasting everything and sorting the desired objects in their layers! gammabeam2011-10-17 23:48:18
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Tue Oct 18, 2011 12:32 am

There's a "hack" to duplicate layouts...Kyatric2011-10-18 00:32:51
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: 6,998
Reputation: 57,791

Post » Tue Oct 18, 2011 2:06 am

Works like a charm! Thanks Kyatric!
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Tue Oct 18, 2011 2:44 pm

Nevertheless I'd like indeed to be able to go to layout via an expression (actually writing down the layout name).
Dropdowns are cool, but for certain cases, writing the name of the layout directly would be better. (Consider layout names "Level1", "Level2", "Level3", it would allow for example when doing a "restart action" to write it like :
System - Go to Layout
"Level" & Level
(Where Level is a global var)).

If you can see my logic there.

Workaround is to test what is the current level and then setting the correct action.
Expression would prevent a few useless condition tests.Kyatric2011-10-18 14:44:40
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: 6,998
Reputation: 57,791

Post » Tue Oct 18, 2011 2:54 pm

Yeah!
Classic has this option (no dropdown actually) and I used it quite a lot :)

For now, my solution was having a "SceneManagement" event sheet which has a big variable checking upon win_state = true, and a "go to" for all the levels I have.
Then I just include this event sheet on all levels, and add those to the event.

Not the best option, but works perfectly for now!
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Tue Oct 18, 2011 3:17 pm

I understand now, and totally agree. Being able to use a variable to hold a layout would be very good.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,839
Reputation: 48,279

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests