Suggestion: Code changes

0 favourites
  • 12 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Ashley

    Hi,

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

    Thanks

  • +1

  • +1; it works excellent on global variables

  • Yep, this should definitely happen.

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

  • ... and the same for functions.

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

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

  • 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

  • [quote:35c89h28]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.

  • 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

    See, you learn something new every day.

    Had no idea about that option, thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think for groups, it should be possible that it happens (since you cannot have 2 groups of the same name now)

    for functions too it could be really useful

    however, for layers I am not sure (since it can change from one layout to another)

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