Statements and blocks
Use braces for function bodies, conditions, loops, and events.
// A comment
health: number = 100
if health > 0 {
debug.log("Alive")
}
Calls
Use parentheses for arguments. Use a dot for a namespace or object member.
debug.log("Hello")
math.clamp(health, 0, 100)
See Functions for declarations and return values.
Collections
Use square brackets for a basket and indexing. Use braces for an empty map.
const items = ["Key", "Map"]
const values = {}
values["first"] = items[0]
Other syntax
See Control flow, Operators, and Events for their syntax. There is no need to learn engine internals to write these statements.