Does GUI Follow Player From Layout To Layout?

Get help using Construct 2

Post » Sat Jun 22, 2013 9:33 am

Hi everyone,

Im wondering if the GUI can follow my player from Layout to Layout or do i have to create the GUI for each layout? Im not sure how that works,I was pondering and started to ask myself if this was possible.I would like to transfer some things from room to room if i can.

                   -Second Question-
One of the things that i really want to do is keep the settings for my sun and moon intrevals upon entering a new layout aswell,I think this goes along with what i need to know so i will ask this as a second question to those who end up seeing this post.Thanks guysRookieDev2013-06-22 09:36:16
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Sat Jun 22, 2013 9:47 am

Any object that's set to Global in the properties pane will not be destroyed upon changing layouts. If you want a global HUD/UI, I suggest that you create it on its own layout, and when the game starts go main menu -> UI layout -> level layout.

Make your sun and moon objects (and anything they're attached to) global as well.

In both instances, just be sure to manage them properly when you go back to the main menu or any non-game layouts. They'll still be there; easiest way is to just set them as invisible. For interactive UI elements, be sure to set their interaction conditions to include "is visible" so they're not activated when they're hidden.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Sat Jun 22, 2013 9:50 am

@GeometriX

Thanks for the reply man,By doing this it will stay in the same position as i have it in my main Layout?I do understand you im just making sure im taking it in the right way.This is the first time i heard about this.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Sat Jun 22, 2013 9:53 am

Yup, it'll stay in the same position.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Sat Jun 22, 2013 9:59 am

@GeometriX Awesome stuff man,

What about the layers? How does it place it? Is there a way for me to tell what layer its on,Or is it set to the same layer as the main Layout? Im not able to add this up.RookieDev2013-06-22 10:00:56
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Sat Jun 22, 2013 10:09 am

Oh, yeah, forgot about that. It always goes to the bottom layer. It's an unfortunately lacking function in that it doesn't respect layers at all.

I suggest that put all the elements in the same family (or in a few, if you're got a mix of sprites, tiled, and text objects), and, at the start of each game layout, move everything in those families to their own UI layer.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Sat Jun 22, 2013 10:15 am

@GeometriX That sucks it dosnt respect layers at all,This will be my first time appointing objects to layers through events Thanks for that.Also before i go i have one last question about this,What do i do about my player it seems that its loading him but its not Respecting the behaviour i placed.Its not scrolling.Do you have any tips on this.Thanks GeometriX

PS.@Ashley i think you should make the Global function respect Layers if its Possible.It would be a killer time saver and i mean a killer.RookieDev2013-06-22 10:17:21
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Sat Jun 22, 2013 10:18 am

You mean the screen isn't scrolling to the player? Are you referring to the Scroll To behaviour?

You'd have to share your capx. The only thing I could think of without taking a look at your code is that you might have more than one object with the Scroll To behaviour.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Sat Jun 22, 2013 10:22 am

@GeometriX I think you are right,I will send it in a PM ok.Thanks for looking at this.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

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,368

Next

Return to How do I....?

Who is online

Users browsing this forum: zsoldiers and 6 guests