[r109] Renaming Layer / Group related bugs

0 favourites
  • 3 posts
  • Not sure if this is a bug or not implemented yet,

    I'll post it here just for the heck of it.

    1. Action/Condition that involved layer, doesn't do a double check whether the layer exist on the layout

    (except "Layer is Visible" Condition)



    To repro, use "MyNewLayer" or layer 30:

    • On Event 2 Create these Conditions:

         System->Compare opacity -> "MyNewLayer" / 30

         Mysprite->Is on Layer "MyNewLayer" / 30

         etc... try other conditions that involved Layer


    • On Event 2 create these Actions:

         System->Set layer "MyNewLayer" / 30 opacity to 0

         System->Create object MySprite on layer "MyNewLayer" / 30

         MySprite->Move to layer "MyNewLayer" / 30

         etc... try other actions that involved Layer

    Expected result:

    • User should not be allowed to use layer name/index that is not exist anywhere on the layout.

    (System -> Layer is Visible seems to work correctly.)

    2. Renaming Layer / Group doesn't update all the reference

    Casually renaming one of the Layer/Group can break your project without you realizing it. (until it's too late).

    This happens to me quite often recently and it's a pain to search for the mistake.

    • especially if you have lots of events spread across more than one sheet with "include" (so you have to double check every included sheet).
    • moreover when you forget what the old layer/group name is.
    • also renaming all the reference manually one by one really adding it to the strain.



    To Repro:


    • Rename layer "SpriteLayer" to "AwesomeLayer" and the sprite will no longer created on screen


    • Rename group "CREATE OBJECT" to "MY GROUP" and the project preview won't do anything after you click the button

    Expected result:

    • When renaming layer/group, all the reference to the layer/group should be magically renamed too.
    • "Or" at least when you preview the project, it will throw some error in the browser/console something like:

    Event 2: Layer "SpriteLayer" doesn't exist

    Event 3: Group "MY GROUP" doesn't exist

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got bit by the second part a couple times, once was such a big one, I change the name back to the default, and left it.

    Speaking of "That does not exist" errors, would it be difficult to have the error offer to create the missing part?

    I.E. "That Layer doesn't exist, would you like to create it?" or "That Global variable doesn't exist, would you like to create it?" (or does this promote bad practice?)

  • Not wanting to bring up an old post, but this post really helped me!! I was having the exact same problem for the second part.

    Haha I kept thinking that I must have typed the layer name wrongly.....even though the layer name is Objects <img src="smileys/smiley17.gif" border="0" align="middle" /> Anyway, changed to the layout number and it worked perfectly.

    So far, only two events have this problem in my game which deal with that layer. The others work fine though.

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