Layer Name Change Bug

Bugs will be moved here once resolved.

Post » Tue Feb 09, 2016 10:27 pm

Problem Description
Layer name change does not change name in event conditions. Causes user to have to waste time looking through events to fix all that were broken because of name change.

Attach a Capx
https://www.dropbox.com/s/648i3qco6rg5i03/LayerNameBug.capx?dl=0

Description of Capx
Shows sprite with 1 event.

"If sprite is on layer "LayerName", rotate 1 degree clockwise."

Steps to Reproduce Bug
  • Step 1- preview with f5, see sprite rotate
  • Step 2- change layer name in layers window
  • Step 3- preview with f5, see sprite not rotating

Observed Result
The layer name change breaks the event because the layer name change only happened in the Layers window and not in the event attached to the name.

Expected Result
Expected result is for layer name changes that occur in the "Layers Window" to also change layer name in appropriate events so it does not break the event.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 10 fully updated

Construct 2 Version ID
221
B
21
S
5
G
1
Posts: 102
Reputation: 1,741

Post » Fri Feb 12, 2016 1:59 pm

Closing as won't fix. This is a known issue, but is impossible to completely resolve: you can use expressions to refer to layer names like "Layer" & index, where 'index' is only known at runtime. Therefore if you renamed Layer1 to SomethingElse1, it's impossible for the editor to know to update the reference to it. We could fix the cases where it updates the layer name if it's constant, but the dynamic names problem remains, so there will still be cases where it's broken.

I think a better solution would be a new feature to find all references to a layer, so you can review events that use it before renaming.
Scirra Founder
B
397
S
236
G
88
Posts: 24,392
Reputation: 194,454

Post » Fri Feb 12, 2016 2:06 pm

Before Closing, I suggest either use an instance variable to identify Layers or use the Layer Number for this if you did not finalize your layer name yet.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,852


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests