Developers can extend Construct 2 with their own plugins and behaviors using the Javascript SDK. This manual documents how to use the SDK and the features Construct 2 exposes through the plugin interface.
This is a technical manual for javascript programmers. If you're looking for help on how to use Construct 2, please see the
Construct 2 manual.
Familiarity with Construct 2 is recommended before developing with the SDK. The terminology and functions may be hard to understand otherwise. The
beginner's guide is a good place for developers to start learning how Construct 2 works.
There is also the
SDK template download which provides a useful starting point for developing a plugin or behavior.
Developer mode for previewing
By default Construct 2 only loads runtime scripts when previewing a project for the first time. Closing and reopening a project will cause Construct 2 to re-load the runtime scripts for all plugins. However, you can also set Construct 2 in to 'developer mode' which causes it to re-load plugin runtime scripts every time you press preview. This can save time during development since you can edit scripts while keeping a project open. To set developer mode, run
regedit and open the following registry key (create it if it doesn't exist):
HKEY_CURRENT_USER\Software\Scirra\Construct2\html5and add the key
devmode and set it to 1 (DWORD value). Note this does not affect edittime scripts - these are only ever loaded the first time the editor starts up, so to reload them you must still close and reopen Construct 2.