Value types
| Type | Example |
|---|---|
| number | 4.5 |
| bool | true, false |
| string | "Ghost" |
| nil | No value |
| basket | [1, 2, 3] |
| map | {} |
| function | fn(x) { return x } |
| handle | A Cell, Actor, Entity, or UI control |
| Numbers are 64-bit floating-point values. Strings support Unicode text. |
Type annotations
health: number = 100
fn add(a: number, b: number): number {
return a + b
}
Use annotations to state what a variable or function expects.
Object handles
A handle refers to an object owned by Worldkiln. The object may be removed while you still have its handle. Use the relevant validity check before using an object that may have been destroyed. See Finding Objects and the API reference.