Does GUI Follow Player From Layout To Layout?

Get help using Construct 2

Post » Sat Jun 22, 2013 11:39 am

Sorry to bother you again @GeometriX,

Im having issues placing Global Objects on the layers in the next layout i have made.
here is the event i was using,I am wondering if there is another way to pick the layer for the object i want to place there.Or is this the only way?
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sat Jun 22, 2013 11:57 am

You shouldn't be creating the objects on each level - they should be there already since they were never destroyed in the first place. They simply carry through from the layout on which they first appear until they're destroyed.

You haven't said what the actual issue is though. What about that event doesn't work for you? But to answer your question, you can also specify layer names as strings. Just be sure to wrap double quotation marks around them like "this".
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Sat Jun 22, 2013 12:09 pm

@GeometriX the issue was i am creating it,I am really lost when it comes to this.Im just asking you if you can show me another way or the right way to do this.I apollogize if i was unclear.I just need your advice.The only way i know how to add the object to a layer thats on a different layout is the way i shown in my previous post.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sat Jun 22, 2013 12:27 pm

But look at what I'm saying: global objects are not destroyed between layouts. So if you have Sprite01 on Layout 1 - created normally with the drag-and-drop interface, and then go to Layout 2 - which doesn't contain an instance of Sprite01, Sprite01 will be there anyway, because it's not destroyed.

So do this: create a layout that only has your UI. Put those in the positions that you want. Assign them all to families. Set them all to Global. In that layout's event sheet, create an event On start of layout -> go to (Game Layout). Those UI elements will carry over. Then have an event in that event sheet On start of layout -> Move (Families) to Layer "UI"
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Sat Jun 22, 2013 12:32 pm

@GeometriX awesome stuff man,You explained that spot on.To tell you the truth i would of been ages trying to figure that out.Thats something a new guy wouldnt know unless he pulled out the shovel and dug.Thanks again Geo have a good day man and i promise that was the last question.RookieDev2013-06-22 12:32:47
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Previous

Return to How do I....?

Who is online

Users browsing this forum: Elliott, kellehk, Voytek and 30 guests