The following expressions are common to several plugins.
- The object's current angle, in degrees. 0 degrees is facing right and angles increment clockwise.
- A number representing the color property of the instance. This can be used with the Set color action to set an object's color to match another object.
- The object's current opacity (semitransparency), from 0 (transparent) to 100 (opaque).
These expressions are available for plugins that support the scene graph feature, allowing objects to be connected together so they move, rotate and scale as if they were one large object.
- Return the number of children currently attached to this object (with the Add child action) in the hierarchy. This is 0 if the object has no children.
- Save the object state to a string of data in JSON format, and return it. This can be downloaded or otherwise stored, and later the state of the object restored using the Set from JSON action.
- The number of instances of the object type.
- The number of instances meeting the event's conditions. For example, if the event has the condition "Mouse is over Sprite", Sprite.PickedCount will return the number of Sprite instances that the mouse is over.
- The name of the object type for the given object. For example Sprite.ObjectTypeName will return "Sprite". When used as a family expression, this returns the name of the actual object type, never the name of the family itself.
- Return the instance's index ID (IID). See instances.
- Return the instance's unique ID (UID). See instances.
Size & Position
- Return the layout co-ordinates of the object's axis-aligned bounding box. This is the smallest unrotated box that completely encloses the object, taking in to account any rotation or stretching.
- Return the size of the object in pixels.
- Return the position of one of the object's image points from its currently displaying animation frame in layout co-ordinates. Either the image point's name or its number can be passed.
- Return the object's position in the layout, in pixels. The origin (0,0) is at the top-left of the layout and the Y axis increments downwards.
- Return delta-time according to the object's own timescale. See Delta-time and framerate independence for more information.
- The name of the layer the instance is currently on.
- The zero-based index of the layer the instance is currently on.
- Return the current elevation on the Z axis for the instance relative to its layer. This is not affected by the layer's Z elevation.
- Return the instance's Z elevation added to the layer's Z elevation, providing the total Z elevation the instance appears at.
- Get the zero-based index of the Z order of this instance within its current layer. 0 is the bottom instance, increasing up to the top instance.
Construct 3 Manual
You are here:
Search this manual:
This manual entry was last updated on 29 Sep, 2020 at 22:52