Construct 3 icon

Construct 3

Documentation

Events

Ashley's avatar
Medal
Construct Team Founder
Published 17 Aug, 2017
426 words
~2-3 mins

Events are Construct's main feature: instead of complicated scripting or programming languages with fiddly syntax and difficult errors, you can define how the game works using a simpler block system. The blocks are collectively referred to as events, although there are several kinds of block making up an event sheet.

Construct's event system is likely to be unfamiliar to new users. Read How Events Work for a summary of how to use them. Events are not cookie-cutter blocks that limit what you can do. Instead they are designed to provide the basic tools you need to create sophisticated games.

The basic concept of events is that conditions filter the instances meeting the condition, then the actions run for those instances only. This allows you to control instances independently, especially when used with instance variables. A common misconception is that all instances of an object type must act the same. That is simply not the case: the fundamental way events work is to filter out individual instances, and run actions on just those that met the conditions.

Events are edited in the Event Sheet View using the Add Condition/Action dialog, the Parameters dialog and Expressions dictionary.

A diagram of a simple event is shown below. (This does not include every feature of events - the rest are explained in this section.)

Diagram of an event in Construct

Events typically consist of conditions that must be met, actions that run if so, and optionally further sub-events that test more conditions, run more actions, etc. A simple way to think about events is "If the conditions are true, then run the actions". However remember that a key feature is that it also filters the instances matching the condition. For example if the condition Bullet collides with alien is met, the action Destroy alien will run, and the Destroy action affects only the instance involved in the condition.

Once you are familiar with events, you will likely find it useful to also use Functions to help manage events as your project gets larger.

Scripting

You can use Construct's event system exclusively and still make complex games with sophisticated logic. However if you are interested in learning a programming language, you can also use JavaScript coding in Construct. You can also mix and match code and event blocks, such as using a line of JavasScript code in the place of an action. To find out more see the manual section on Scripting.

If you already have programming experience, you may be interested in extending Construct using the Addon SDK.