Object
Script representation of a Novelty object.
Object is a reference type. This means it has no constructor and can only be passed around by handle (Object@).
Members
string name (Property)
The object's name.
const string type (Property)
The object's type name. You can not change this property.
const Object@ parent (Property)
Handle to a parent object. You can not change this property.
Vector2 position (Property)
Position coordinates in pixels (x, y)
Vector2 pivot (Property)
Pivot point coordinates in pixels (x, y)
Vector2 size (Property)
Size dimensions (width, height)
float rotation (Property)
Rotation in radians.
float scale (Property)
Scale factor.
float red (Property)
Red value of object's color.
float green (Property)
Green value of object's color.
float blue (Property)
Blue value of object's color.
float opacity (Property)
Opacity value of object's color.
bool visible (Property)
Is the object visible?
BlendingMode blending (Property)
Object's blending mode.
bool pixelated (Property)
Disables texture smoothing for the object.
string OnUpdate (Property)
The name of the object's OnUpdate event.
string OnCreate (Property)
The name of the object's OnCreate event.
string OnDestroy (Property)
The name of the object's OnDestroy event.
string OnShow (Property)
The name of the object's OnShow event.
string OnHide (Property)
The name of the object's OnHide event.
string OnMouseEnter (Property)
The name of the object's OnMouseEnter event.
string OnMouseLeave (Property)
The name of the object's OnMouseLeave event.
string OnMouseClick (Property)
The name of the object's OnMouseClick event.
string OnMouseRelease (Property)
The name of the object's OnMouseRelease event.
string OnMouseMove (Property)
The name of the object's OnMouseMove event.
Index operator
Variant@ [const string& variableName]
Returns the handle of an internal variable.
Methods
Color GetColor() const
Returns the color of the object.
void SetColor(const Color &in color)
void SetColor(float red, float green, float blue)
void SetColor(float red, float green, float blue, float opacity)
Set the color of the object
void Show(float timeInSeconds)
Shows the object over a timed interval.
Triggers the OnShow event if available, otherwise performs a fade in.
void Hide(float timeInSeconds)
Hides the object over a timed interval.
Triggers the OnHide event if available, otherwise performs a fade in.
bool IsMouseOver() const
Returns true if the mouse cursor is over the object.
bool IsTypeOf(const string &in typeName) const
Returns true if the type name corresponds with the object's type.
void Refresh()
Causes the object to update its geometry.
uint GetChildCount() const
Returns the number of children the object has.
Object@ GetChild(uint index) const
Object@ GetChild(const string &in name) const
Returns handle to a child object, or null.
void Destroy()
void Destroy(float delayInSeconds)
Destroys the object.
When this method has been called, any handle to the destroys object becomes invalid.
void SetPersistent(bool bPersistent)
Sets the object's persistence. A non-persistent object will not be stored in game states.
UID GetUID() const
Returns the unique identifier for the object.
string AsString() const
Returns a string describing the object.