Find / Replace texts in events

0 favourites
  • 4 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Man I would like to have a simple find and replace text in the event sheets.

    The find feature does not quite do it, because when you are searching for a specific string or refactoring it is so hard searching through your lines of code to find what you are searching for.

    Sometimes it would be just nice to be able to edit the source directly in a text editor, if you have to refactor your code.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If your project is saved as a .caproj file, you can open up event sheets directly (they are xml files under the subfolder 'event sheets'). You can find variable names and the like this way.

    It's not a good idea to edit these directly though, unless you are very careful. For example, if you change a variable name, you have to change all it's occurrences across all event sheets. Any events you miss will be broken.

  • It's not a good idea to edit these directly though, unless you are very careful. For example, if you change a variable name, you have to change all it's occurrences across all event sheets. Any events you miss will be broken.

    This is why I would like to see a find/replace option in construct 2.

    Refactoring in Construct 2 is a pain.

  • hgr

    I agree, it can be a pain. I just try to work around it.

    The best thing is to keep a small number of event sheets. I used to use event sheets for partitioning a project into components; now I tend to pack more into an event sheet and use groups to sort things.

    For example: instead of a sheet for every level, put the logic for each level in a group, and all those groups in one event sheet. Start with all level logic inactive, and activate/deactivate the groups as needed.

    For logic that needs to be included across different sheets, I try to encapsulate as functions unless the operation is going to be called so often as to become a performance issue. All the functions go on one sheet, which is included where needed.

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