Construct 3 icon

Construct 3

Documentation

Object types

Published 16 Aug, 2017
265 words
~1-2 mins

Object types are a central part of game design in Construct. Object types define a 'class' of an object. For example, TrollEnemy and OgreEnemy could be different object types of the Sprite plugin. They have different animations and events can be applied separately to make them look and act differently, despite the fact they are both Sprite objects.

There can be multiple instances of an object type in a project. For example, you may wish for there to be four TrollEnemy objects awaiting the player in a game. These four instances share the same animations, images, behaviors, instance variables and events. (In the case of instance variables, each instance stores its own unique value, e.g. for health, and behaviors work independently for each instance too.)

Object types do not themselves have a position, angle or size. These are properties of the instances of the object type. The Project Bar displays the object types in the project, but not the instances. You can also add, rename and delete object types from the Project Bar.

Events are made to apply to an object type. The event then filters the instances that meet the condition. For example, the event "Bullet collides with Alien" is an event that applies to all instances of the Bullet and Alien object types. However, when the event runs, the actions only apply to the specific instances involved in the collision. For more information see How events work.

Object types can also be grouped together in to Families Paid plans only. This can help avoiding repeating the same events for different object types.