Problem with Layers

Get help using Construct 2

Post » Tue Jan 07, 2014 1:43 pm

Hi everyone,

I was using the free version until just recently, so my layers were limited to 4. 0 and 1 for background, 2 for objects and 3 for HUD. Now that I've upgraded, I want to another layer for my background.

However, events in C2 only recognize layers based on their number id not layer name. This is a big problem since background layers need to be at the beginning, and to add another background layer would mean my objects and hud layer numbers are all +1.

I am really hoping that manually changing every events that are affected by the layers is not the only solution. Is there is an efficient way for solving this problem?

Thanks!
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Tue Jan 07, 2014 2:43 pm

@rekjl you can use number or layer name..
check at layer parameter..

http://www.scirra.com/manual/85/layersfarieh2014-01-07 14:44:42
B
12
S
2
G
1
Posts: 25
Reputation: 986

Post » Tue Jan 07, 2014 3:35 pm

@farieh Thanks for your reply.

I can't get it to work. I have a lot of objects that are created during the game, so in the create objects event, I specify the layer it is created by the layer number. I tried to enter the name but it says unknown expression. Perhaps I am doing it wrongly?

If I could specify it by layer name, it would definitely help.
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Tue Jan 07, 2014 3:40 pm

You need quotes on the name in Create - it's a string.
ImageImageImage
B
71
S
22
G
249
Posts: 3,764
Reputation: 138,579

Post » Tue Jan 07, 2014 4:34 pm

@blackhornet

Thank you so much!! It works perfectly.
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Wed Jan 08, 2014 11:11 am

@rekjl

for string u need add quote,,,

that make diferent string and variable in parameter
B
12
S
2
G
1
Posts: 25
Reputation: 986

Post » Wed Jan 08, 2014 12:26 pm

@farieh

Yup, blackhornet had mentioned it as well. Thanks again for your help!
B
46
S
23
G
31
Posts: 693
Reputation: 20,637


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests