GDScript quick reference
Earlier edition reference / Current 0.86.4.0 property paths > p. 350
| Job | Native GDScript form |
|---|---|
| Comment | # comment; not // |
| Declaration | var count: int = 0 or var count := 0 |
| Constant / enum | const LIMIT = 10; enum State { LOCKED, OPEN } |
| Function | func name(value: int = 1) -> int: followed by an indented body |
| Decision | if / elif / else, each with a colon |
| Conditional value | a if condition else b |
| State selection | match with indented patterns and _ fallback |
| Loop | for value in collection / range; while condition |
| Loop control | break / continue |
| Function exit | return / return value |
| Array | [1, 2], Array[String], append/size/has |
| Dictionary | {"open": false}, get/has/keys/erase |
| Wait | await signal or await coroutine_call() |
| Signal | signal declaration; connect Callable; emit(arguments) |
| Inheritance | extends one base; super calls parent |
| Reuse | preload/load for files; CallScript/IncludeScript for PCA records |
| Native context | self = Node instance; this = PCA caller proxy; player = character proxy |
Case matters. Godot native globals usually use lowercase snake_case. PCA helpers/actions use the capitalized names in their reference. Dictionary keys keep their own exact spelling.
