[r109] Renaming Layer / Group related bugs

Bugs will be moved here once resolved.

Post » Mon Nov 12, 2012 10:20 am

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 existPotato2012-11-12 10:23:15
Posts: 134
Reputation: 8,118

Post » Tue Nov 13, 2012 6:55 pm

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?)
Posts: 906
Reputation: 41,349

Post » Wed Jan 08, 2014 2:11 pm

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 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.
Posts: 693
Reputation: 20,637

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests