Instances

Object instances are the actual objects you see in a game: an instance of an object type. For example, if there are four TrollEnemys in a layout, those are four instances of the TrollEnemy object type.

It is instances which have a position, angle and size in the layout. Object types do not have these properties - they simply define a 'class' of object.

Instances can be created at runtime in the event system (typically by the System Create object action and the Sprite Spawn an object action). They can also be pre-arranged in layouts with the Layout View to design levels, menus and title screens.

Selecting an instance in the Layout View shows its properties in the Properties Bar. These are a mix of properties in common with all (or most) objects, and plugin-specific properties. The common properties are described below, and plugin-specific properties are described for each plugin in the Plugin reference.

Common instance properties

The following properties are common to all or most objects, depending on their capabilities.

Name
The name of the associated object type.

Plugin (read only)
A reminder of the plugin (kind of object) this object is based on.

Global
By default, all instances are destroyed when the layout ends (e.g. when going to the next layout). If Global is Yes, none of the instances of this object type will be destroyed when switching layouts.

Layer
The layer the instance is placed on.

Angle
The angle in degrees the instance is oriented at. This can also be altered with the angle handle in the Layout View.

Opacity
The instance opacity (or semitransparency), from 0 (transparent) to 100 (opaque).

Position
The X and Y co-ordinates in the layout in pixels. This is measured to the object's origin (see image points). This can also be altered by moving the instance in the Layout View.

Size
The width and height of the instance in pixels. This can also be altered by dragging the resize handles in the Layout View when one instance is selected.

Edit variables
Open the Object Instance Variables dialog.

Edit behaviors
Open the Object Behaviors dialog.

Edit effects
Open the Effects dialog.

Tags: