How do I make an object global across multiple layouts?

Get help using Construct 2

Post » Mon Feb 02, 2015 11:43 pm

I have multiple layouts, which the player progresses though, but I want to keep a chat box common throughout them.

I have common functions to control the chat, that are included in each layout, but the box itself seems limited in scope to a specific layout, can I make it visible to all ?
B
7
Posts: 33
Reputation: 351

Post » Tue Feb 03, 2015 12:13 am

You can make a layer global in the layer options, then put the UI of your chatbox in this layer. You can also make one Event Sheet only for the chatbox and include this Event Sheet in the other layouts, where you need it.
B
11
S
2
Posts: 213
Reputation: 1,266

Post » Tue Feb 03, 2015 12:53 am

Ohhh, global layer, that sounds ideal, I will try it, thank you.
I already have the events on their own sheet.
B
7
Posts: 33
Reputation: 351

Post » Thu Feb 05, 2015 5:19 am

hmmm, global textboxes lose their content and focus, when layouts are changed, is there a way to prevent this?
You do not have the required permissions to view the files attached to this post.
B
7
Posts: 33
Reputation: 351

Post » Thu Feb 05, 2015 5:29 am

Hi
I have a textbox attached to a global layer, how do I keep its content, and focus when layouts changes?

I realize I could store the textbox content in a global variable and re-populate it with each new layout, but I wondered if there was a better way to do this, where the textbox content is preserved, and can be regarded as truly global.

Attached is a small example of the issue
You do not have the required permissions to view the files attached to this post.
B
7
Posts: 33
Reputation: 351

Post » Thu Feb 05, 2015 5:35 am

Looks like the repopulate idea would work best.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293


Return to How do I....?

Who is online

Users browsing this forum: Matei511, tarek2 and 64 guests