Top Layer

Get help using Construct 2

Post » Tue Dec 03, 2013 3:45 pm

I have no issue with pulling an object to the top of a layer, but is there a way to move an object to the upper most layer?

Say for example I have an object that will blackout the screen. I could go through each level creating a layer specifically for this, but I would rather just add it to the layers already created.

In my experience, performance tends to get worse when I have more layers.

Example:

Start of level - Create black out on layer (uppermost layer).
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Tue Dec 03, 2013 3:55 pm

Do it via numbers! All layers automatically get assigned a number. (Create on layer 0 for the topmost i think) :)
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Tue Dec 03, 2013 4:01 pm

[QUOTE=AnD4D]
In my experience, performance tends to get worse when I have more layers.
[/QUOTE]

You may want to post a bug report if this is the case, as Ashley specifically states in the manual HERE that:

"Number of layers usually has no effect, unless most of the layers have changed their opacity, have effects applied, have a blend mode other than 'Normal', or use 'force own texture'. However typically there is no performance impact from using multiple layers with default settings."

I've got a test going on at the moment and have 10 layers just for parallax effects. Seems to run fine for me.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,388
Reputation: 58,458

Post » Tue Dec 03, 2013 4:58 pm

[QUOTE=Jase00] Do it via numbers! All layers automatically get assigned a number. (Create on layer 0 for the topmost i think) :)[/QUOTE]

@Jase00 I was under the impression 0 was the lowest layer.

@zenox98 I mentioned this quite a few times over the last few months. I once had loads of layers (around 20), and was getting awful results on mobile. I managed to get this down to 4, and ended up with pretty smooth results.

I wouldn't have thought it was a bug though...
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Tue Dec 03, 2013 7:58 pm

You can create or move an existing object to any layer using a string with the layer's name.

System > Create object.

Object > Move to layer.
Thiago Rocha
[email protected]
B
17
S
4
G
5
Posts: 41
Reputation: 4,264

Post » Tue Dec 03, 2013 11:17 pm

@thiago

Do you know how to guarantee it's always the top most layout if you don't know the names?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Tue Dec 03, 2013 11:53 pm

I guess you can use a very big number like 99, so it will send the object to higher layer before 99.
Thiago Rocha
[email protected]
B
17
S
4
G
5
Posts: 41
Reputation: 4,264

Post » Wed Dec 04, 2013 12:36 am

I think you should know what the top layer is because I don't think you're able to create layers once the game is running.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Wed Dec 04, 2013 8:53 am

@thiago I wonder if that would work. I'll have a try a bit later.

@plinkie

Yes, but my point is, some levels are going to have more layers than others, and not all layers may have the same name. I can go through each layer and ensure I either change the name or memorize it for the event setup, or I could just have the action occur to the uppermost layer.

I am going to assume this isn't yet possible.

Not a problem. I'm not yet at a position where this would be an issue. Just a shame, as I thought it's something that made sense.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 963
Reputation: 10,721

Post » Wed Dec 04, 2013 7:47 pm

Does it not make sense to have a layer with the same name in every layout that always exists as the top layer?
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Next

Return to How do I....?

Who is online

Users browsing this forum: evillair, jorgmaquoi and 30 guests