Suggestion: Code changes

Discussion and feedback on Construct 2

Post » Wed Apr 02, 2014 11:19 am

@Ashley

Hi,

would it be possible to automatically change references in the code when layers are re-named ,also the same for Groups ?

Thanks
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Wed Apr 02, 2014 1:10 pm

+1
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Wed Apr 02, 2014 1:19 pm

+1; it works excellent on global variables
B
38
S
13
G
6
Posts: 145
Reputation: 5,348

Post » Wed Apr 02, 2014 5:18 pm

Yep, this should definitely happen.
B
28
S
3
G
1
Posts: 29
Reputation: 1,698

Post » Wed Apr 02, 2014 6:27 pm

+1

In fact I filed this as a bug long time ago when C2 is still version 109 (Nov 12, 2012), but I guess it got buried.

viewtopic.php?f=151&t=75811
B
34
S
13
G
8
Posts: 134
Reputation: 8,118

Post » Wed Apr 02, 2014 6:35 pm

... and the same for functions.
B
11
S
1
G
1
Posts: 81
Reputation: 892

Post » Wed Apr 02, 2014 6:59 pm

Also one more thing to note. While having the references automatically change is in most cases a time saver, in some cases it can pose a problem.
For instance, I created a global variable in one event sheet and used it in the same event sheet, thinking I would need it in other layouts. Turns out I had to reuse part of the logic using the global variable in another layout.
At this point I had to copy the global variable to my "global variable dump" event sheet and manually change the references in the events from the old variable to the newly created one.
B
33
S
12
G
7
Posts: 227
Reputation: 7,582

Post » Wed Apr 02, 2014 7:24 pm

Yeah, I've had to do that before. On the whole it saves time, but occasionally it gets in the way. Still, I'd love to see this for groups and maybe layers. Functions...I don't know how that would work the way functions are now.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,187

Post » Wed Apr 02, 2014 7:37 pm

KFC wrote:For instance, I created a global variable in one event sheet and used it in the same event sheet, thinking I would need it in other layouts. Turns out I had to reuse part of the logic using the global variable in another layout.
At this point I had to copy the global variable to my "global variable dump" event sheet and manually change the references in the events from the old variable to the newly created one.


I don't really understand why you 'd have to do this, using the "Move to event sheet" option let's you move the variable across event sheet without needing any event editing at all, or maybe I understood wrong
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Wed Apr 02, 2014 7:51 pm

Also one more thing to note. While having the references automatically change is in most cases a time saver, in some cases it can pose a problem.
For instance, I created a global variable in one event sheet and used it in the same event sheet, thinking I would need it in other layouts. Turns out I had to reuse part of the logic using the global variable in another layout.
At this point I had to copy the global variable to my "global variable dump" event sheet and manually change the references in the events from the old variable to the newly created one.


Think that more comes down to poor design, which is not meant as an assault in anyway, but something that everyone experience while doing things, but are also those types of things that next time you start a project, know how to avoid. And the moment you are aware of it, then things like automatic renaming start to be helpful and needed.
An example is something I suggested in another post was the ability to right click a function call and go to the function so you don't have to search high and low to find it. The reason I would like such functionality is because I haven't found a really solid way to organize functions correctly, so sometimes my structure simply doesn't match where I would expect a function to be, and then I have to go through lots of event sheets trying to find it. Which is partly due to poor design by me, because I sometimes just want to make things and then Im not careful about organizing things correctly, but also sometimes its just very difficult to organize functions that involve several different element, that can fit more places. But anyway that's another thing.

But following along the forums there are so many good suggestions that could improve all these small annoying things and hope that they will make some of them soon, as im not really interested in any of the different mobile implementations anyways. :D
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests