Builtins: Values and conversion
On this page
vector2()#
vector2(x = 0, y = 0)Construct a two-coordinate value. Use it for 2D positions and offsets.
Returns: Vector2.
vector2(120, 80)vector3()#
vector3(x = 0, y = 0, z = 0)Construct a three-coordinate value. In a normal 3D room, Y is height and X/Z span the floor.
Returns: Vector3.
vector3(2, 0, -3)color()#
color(text) or color(r, g, b, a = 1)Construct a color from an HTML-style string or normalized numeric components.
Returns: Color.
color("#88bbff")Invalid color text falls back to white. Components normally use 0 to 1; a hex string is often easier to copy from a designer.
len() and aliases#
len(value)Count text characters or array/dictionary entries.
Returns: Integer size; 0 for null or an unsupported value.
Aliases: length()
len(["key", "note"])