Re-use HUD layer across layouts?

Get help using Construct 2

Post » Wed Jul 09, 2014 8:07 pm

Hi,
do I have to rebuild my HUD for every layout/level or can I transfer a layer from one layout to another?
B
15
S
6
Posts: 233
Reputation: 1,933

Post » Wed Jul 09, 2014 8:21 pm

you can transfer it.
B
19
S
6
G
3
Posts: 197
Reputation: 4,154

Post » Wed Jul 09, 2014 8:35 pm

sweet. will you make me ask how?
B
15
S
6
Posts: 233
Reputation: 1,933

Post » Wed Jul 09, 2014 11:14 pm

there are different ways, but how did you set up your HUD?
B
19
S
6
G
3
Posts: 197
Reputation: 4,154

Post » Thu Jul 10, 2014 3:15 am

Make a seperate layout called HUD, build it there, then make all the objects global. when you go to a level, first go to that HUD layout to "grab" the objects, then go to the level that you need to go to.

Another way is to just create your HUD with code on the start of any level layout without them being global.
B
47
S
14
G
7
Posts: 603
Reputation: 8,141

Post » Sat Jul 12, 2014 8:49 pm

ok, so just to be sure, we are talking about dynamically transferring objects between layouts, not copy-pasting stuff in the editor, aren't we?
If so, perfect. Moreover: how? Please tell me how I can "grab" and transfer "global" objects to another layout
B
15
S
6
Posts: 233
Reputation: 1,933

Post » Sat Jul 12, 2014 9:01 pm

"Global" is a property of the object itself, so you just need to set that to "true" and then once it's on a layout once it will stay until it's destroyed in events.

Event better, if you create the HUD objects on a named/specific layer, and have that same layer setup in all the other layouts, it should stay over top of everything else I think. :)
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
125
S
42
G
17
Posts: 2,230
Reputation: 19,922

Post » Sat Jul 12, 2014 9:08 pm

right, works, thank you!
B
15
S
6
Posts: 233
Reputation: 1,933


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], jogindarpradeep and 17 guests