Using same menu in different layouts

For questions about using Classic.

Post » Thu Aug 18, 2011 11:51 pm

Thanks for reading!

Say I got my inventory screen that I want to be able to bring up both in the navigation layout and the combat layout, how would you go about it?

1. Put all the inventory feature assets in a Base layout, flag them global then call them individually every time you bring up the inventory in anyother layout


2. Put them in the same "inventory" layer in every layout and make them appear when needed.

Considering that the inventory has to be saved in a savegame.

Thanks again!
B
4
S
2
G
2
Posts: 108
Reputation: 1,366

Post » Fri Aug 19, 2011 12:07 am

Number 2 saving to an ini, or similar.
Once you save something externally its just about the same as global.
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Fri Aug 19, 2011 1:02 am

Sounds good! Cool I'll do that thanks a lot.
B
4
S
2
G
2
Posts: 108
Reputation: 1,366

Post » Fri Aug 19, 2011 3:04 am

This is where you discover the awesomeness of inheritance layers. From the wiki:

Every layer has a property titled 'Inheritance Layer'. Using this property, it is possible to display the content's of another layer - even from a different layouts! Just specify the (unique!) name of the layer you would like to 'inherit', and Construct will search for that layer in the entire application. This is very practical to make things like HUDs appear in multiple layouts without having to copy their containing objects.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Fri Aug 19, 2011 3:33 am

I'm getting quite enlighten indeed. This is epic.
B
4
S
2
G
2
Posts: 108
Reputation: 1,366

Post » Fri Aug 19, 2011 7:50 am

The inheriting thing is very useful, but i have had it go a little haywire in the editor.

And setting up your hud on every layout is tedious and hampers change.

The way I handle these sorts of things is to manually create them at the start of the layout using events.Steven2011-08-19 08:37:59
B
9
S
2
G
4
Posts: 346
Reputation: 2,726


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests