What is the best way to work with the built-in JS editor?

Not favoritedFavorited Favorited 0 favourites
  • 4 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • I’ve just started my first project with JS-Scripts in Construct 3, and I’m using quite a few JS scripts. However, when working with the built-in editor, I’ve noticed that it’s often not that easy to open the part of the code I want to edit.

    In particular, I’ve noticed that when I double-click on the desired spot in the code, the view in the editor always jumps all the way to the top, to the first line of the script.

    Is there perhaps a trick that makes the editor jump directly to the clicked location in the code instead?

    Or are there any tips for working in the JS editor that might make the process a little easier?

    Thanks in advance for your advice and help

    Tagged:

  • In particular, I’ve noticed that when I double-click on the desired spot in the code, the view in the editor always jumps all the way to the top, to the first line of the script.

    It shouldn't be doing that - perhaps it's a bug. If Construct isn't doing something right, please file an issue.

  • I’ve noticed that too. As far as I know, there isn’t currently a way to make the JS editor jump directly to the exact clicked line and it often opens from the top of the script instead. One thing that helps is splitting larger scripts into smaller files and using clear function names so search becomes easier. The search function and code folding can also make navigation a bit less frustrating while working on bigger projects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've now found a good solution that works for me by using external scripts and VS Code.

    Even though VS Code might be a bit overkill for a few JS scripts, it works very well.

    I think any script that’s more than 200 or 300 lines long would benefit from this.

    Of course, you can use any other editor instead of VS Code. But VS Code really offers everything I need for my modest coding needs, plus many other helpful features and extensions.

    Thank you very much for your answers and your help. :-)

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