Layer Name Change Bug

0 favourites
  • 3 posts
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • 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

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)