If I had one wish for C3

0 favourites
  • 9 posts
From the Asset Store
Design for game, asset for game, game kit, UI design, completed design for game, mobile game, Winter Wish
  • It would be the ability to highlight sections of code and to find/replace inside the selection.

    (Just the text part not any of the actions or objects, that's already available)

    Example: for each, loopindex of "abc" then have the ability to highlight the lines of code that have "abc", find "abc" replace with "xyz"

    It must be a pain to code that, otherwise I'd assume it would have been done.

  • What you're describing is the name of a loop? That's not going to affect much whether it's called abc or xyz.

  • That wasn't the point, but you are correct!

    However, if you have something like animation by name, and you quickly want to swap it.

    Or any hardcode that should really be a variable, or a variable name that you would swap to another, etc, etc, etc.

  • Agreed this would be very useful, but not sure if it's possible. Add it to the suggestions platform or tag Ashley?

  • So find/replace a text in all expressions? Yes, this would be useful.

    I would also very much like the ability to replace objects in events with a different object type.

    Yes, I understand that some events or actions may be incompatible, but many events exist in all objects. So the editor should allow me to replace "Sprite Set position" to "TiledBackground Set position" for example. Or "Text set text" to "SpriteFont set text".

  • I think this could prove very complicated, since you could accidentally make thousands of expressions invalid in your project, if you did a find-replace that produced invalid syntax. There would have to be some way to prevent that, and that may in turn prove sufficiently limiting that the feature doesn't do what you want it to any more.

    Find-replace is also notoriously error prone - for example if you do a naive text-based find and replace for "text" with "label", and buried somewhere in thousands of events you have some dialog shown in game saying something like "In the right context we could...", that will also update to "In the right conlabel we could...". Now you've mangled a bunch of your game's dialogue in hard-to-find ways that will only show up after hours of playtesting. This is such a common problem that whenever I want to do find-replace myself in Construct's code, I actually just do a find, and manually update all the results so I don't end up making that type of mistake. So I would suggest a similar approach in Construct is wise - and you can already do it that way.

    For the most part, if you rename something in the editor, like an object name, it automatically updates all its references in the rest of the project. So it kind of exists in that form already.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One trick I've learned for referencing Object Names is as an example "Sprite" to use Sprite.ObjectTypeName instead so it updates with the rest of the project and isn't treated like a string.

  • You can do this by editing the event sheet files in Notepad++ or any text editor. I wouldn't recommend it unless you know exactly what you're doing though and verify what you are replacing or it will break things like Ashley said. Also close and back up the project, obviously. And it won't work on things like object names because they have other hidden references elsewhere in the project.

  • I would also very much like the ability to replace objects in events with a different object type.

    Yes, I understand that some events or actions may be incompatible, but many events exist in all objects. So the editor should allow me to replace "Sprite Set position" to "TiledBackground Set position" for example. Or "Text set text" to "SpriteFont set text".

    However this would be very welcome. Couldn't count all the situations when I wanted to replace something and got confused as to why it doesn't let me. Ah 'mkayyy.. this is a tiled background not a sprite/9-patch/whatever. .. and the only way out is redoing a bunch of things from scratch. Would be great if some basic types were compatible for replacement.

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