You can attach a script to any item in Godot to make it interactive. To avoid creating one massive script of code, it’s better to divide a large program into smaller ones that work together. Such small programs that make up a larger program are called functions.
Ideally, a function should perform one task and take up no more than one page or screen. By keeping a function small, it’s easy to understand how it works. Large amounts of code can be difficult to search to find errors. ...