Groups with same name on different event sheets

Bugs will be moved here once resolved.

Post » Tue Sep 10, 2013 6:54 pm

Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/2383513/linkedOUT/groupbug.capx

Steps to reproduce:
1. Create 2 event sheets with the same group name
2. Have one group with "active at start" on, and the other off

Observed result:
All the groups with the same name become active, even if the event sheet with the active group isn't referenced anywhere.

Expected result:
C2 shouldn't allow me to make groups with the same name in different sheets.

Browsers affected:
All of them

Operating system & service pack:
Win8 x64

Construct 2 version:
r143
B
125
S
43
G
41
Posts: 849
Reputation: 28,260

Post » Tue Sep 10, 2013 11:25 pm

interesting, I always avoided that instinctively, good to know, bad its a bug...
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Tue Sep 10, 2013 11:30 pm

I'm not sure it's even a bug, but since you can't reference which event sheet you're talking about when using groups actions, I think that it's better to send out an error or something.. I accidentally created two "debug" groups on different sheets and everything got messed up.

In any case if you wanted to have the same group in multiple event sheets you can create another event sheet, put the group on it and reference it wherever you want.
B
125
S
43
G
41
Posts: 849
Reputation: 28,260

Post » Fri Sep 13, 2013 12:48 pm

I'm not sure we can fix this. The 'set group active' action identifies a group by its name. So using that action you could not set either group individually active or inactive. The same happens with the initially active state. And if we then disallow naming two groups the same, what about existing projects that already do it?
Scirra Founder
B
400
S
236
G
89
Posts: 24,549
Reputation: 195,475

Post » Fri Sep 13, 2013 8:09 pm

@Ashley - previously, when disallowing groups to be named the same was first implemented, I seem to recall opening a project saved in an earlier version that had multiple groups named the same and c2 acted like nothing happened - it only prevented naming groups the same from then on. I recommend doing the same if you are going to change this, then previous projects would not be broken and new ones would work properly as well.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Wed Oct 02, 2013 6:08 pm

Ashley, you could make newly created group names include the event sheet name, but filter it to not show that part of the name. It wouldn't change existing projects.

However "This group already exists" sounds perfectly logical to me. I would only expect to be able to use the same name if my intention was to create the conflicts on purpose.
B
240
S
62
G
33
Posts: 903
Reputation: 40,589

Post » Fri Dec 06, 2013 4:44 pm

Closing since r153 now enforces all group names to be unique.
Scirra Founder
B
400
S
236
G
89
Posts: 24,549
Reputation: 195,475


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 6 guests