Scripting: Constructors

From Waltz
Revision as of 16:48, 18 February 2019 by Patrick Angle (talk | contribs) (Created page with "Constructors are special functions in Waltz that allow for the creation of a specific type of value. For example, to construct a new Color object, you could u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Constructors are special functions in Waltz that allow for the creation of a specific type of value.

For example, to construct a new Color object, you could use the Color(r, g, b, a) constructor documented on Color's Type documentation.

Not all objects have constructors, for example Touch objects, as they are not indented to be created in scripts, only by nodes.

Expressions and Scripting
Concepts Script Expressions · JavaScript
Fundamentals Constructors · Functions · Grammar · Operations · Outputs · Parameters · Referencing Nodes
Advanced Topics Flow Control · Consumer Functions · Loops and Iterations · Reference Chains
Errors Recursion · Script Exceptions · Syntax Errors · Try and Catch