Layer routing in event editor does not update

Bugs will be moved here once resolved.

Post » Tue Feb 14, 2012 7:28 am

Hi

This one is a bug i found while adding a new layer.
The bug functions as follows:

Example:
3 Layers in layout.
Layer Text   "number 3"
Layer Hud    "number 2"
Layer level "number 1"

Event has been made pointing towards specific layer.

Event 1: When collision spawn sprite on layer 2 (Layer Hud).

Now i open the layout editor again and ad a new layer to this layout which wil be named by me as New layer and automaticly has been numbered as layer 4.
Now i move this New layer down beneath "Layer Level" so this New layer automaticly becomes layer "number 1".

So now i have.
Layer Text   "number 4"
Layer Hud    "number 3"
Layer level "number 2"
New Layer    "number 1"

I now preview the game and see that the object is being spawned on "Layer Level" instead of (Layer Hud).

I go to the event editor and see that Event 1 is not updated.
(After i had moved my New layer beneath the first layer it should have set Event 1 to: When collision spawn sprite on "layer 3" instead of layer 2)

The event editor does not update Layer routing in Events accordingly "after" adding a new layer that wil be moved bellow a other layer that allready has events connected.

My conclusion is simple: Have the event editor look at layout names instead of layout numbers.
Then it knows what to update after such a layer positional transfer.

So then in the future such an event would look like.
Event 1: When collision spawn sprite on layer Hud.

Instead of.
Event 1: When collision spawn sprite on layer 2


Hope i have explained it understandable ;-)
And i hope this bug can be solved cause manual rerouting, well.. its manual ;-)

Kind Regards and keep it rocking!
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Tue Feb 14, 2012 1:22 pm

You can already refer to layers by their name in the event editor (eg. Create object on layer "Hud"), as long as you put the name in quotes, which should solve this problem =)
B
22
S
6
G
10
Posts: 118
Reputation: 8,005

Post » Tue Feb 14, 2012 1:41 pm

Indeed what Haematite said is correct.

I don't think it's a bug that the events don't "follow" the layers order.
Also, the first number of layer is 0, not 1.

Calling the layers by their text name is the best way to reference them whatever their order is.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Tue Feb 14, 2012 2:40 pm

This probably won't be fixed because if you want to reference one layer no matter where it is, as suggested you should use its name. Using a number is for referencing a layer by index regardless of its name. For example you might want to spawn an object on layer 0 to always spawn it on the bottom layer regardless of what layers you move around in the layers bar. So I think this behavior will stay.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Tue Feb 14, 2012 3:48 pm

Super!

I did not know that i should use the "" quotes to adres to the correct layer.
And because of that construct 2 aplied that i should use numbers, so i did.

U all helped me allot with this.
And @Ashley: Suddenly using a number or a name has become an extra option for me!
Thanx.
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Mon Jul 30, 2012 2:41 am

Maybe the error message could offer the suggestion"
"This is not a system expression or variable name in this scope. (perhaps you meant to use quotes?)"
B
201
S
52
G
30
Posts: 897
Reputation: 36,621


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 5 guests