Plugins

Plugins define a kind of object. For example, a Sprite is a kind of object, and the Audio object is a different kind. These are defined by the Sprite plugin and Audio plugin respectively. See the Plugin reference for more information on individual plugins.

Javascript programmers can make new plugins (and behaviors) using the Javascript SDK.

Most plugins define their own properties in the Properties Bar. To see a full list, locate the plugin in the Plugin reference.

There are three main kinds of plugins:
Visual plugins (e.g. Sprite) appear in the layout and draw something to the screen.
Hidden plugins (e.g. Array) are placed in a particular layout, but do not draw anything to the screen.
Project-wide plugins (e.g. Mouse, Audio) are added to the entire project, and can only be added once. There cannot be more than one object type or instance of a project-wide plugin. They simply enable a new capability (such as being able to take mouse input). They are most useful used in the event system.

Construct 2 is designed modularly. That means not much functionality is built in: you must insert a plugin before you can use the related features. For example, you cannot play back any audio before adding the Audio plugin to a project. This might seem unnecessary, but there are many project-wide plugins and it is unlikely every project will need to use all of them. For example, if the Audio plugin was automatically included with every project, even projects which do not need Audio support must pay the cost of performance penalties, larger download sizes, and so on. So remember if you do not add a plugin, it is not at all included in your project, and this helps your projects remain lean and efficient when exported.

Installing third party plugins

Third party developers can create and distribute their own custom plugins using the Javascript SDK. Remember that Scirra cannot support you if you have issues using third party plugins - you should contact the plugin developer for help, support or new feature requests.

To install a third party plugin:

  1. Close Construct 2
  2. Copy the plugin's folder to <install path>\exporters\html5\plugins. You'll see each plugin has its own folder here, so to add a new plugin create a new folder and add the plugin's files inside it. For behaviors, copy to <install path>\exporters\html5\behaviors instead.
  3. Launch Construct 2 and the plugin or behavior should be available from the editor.

Tags: