The events are used to call methods. The events section in our program is used to call "my first method" which is the main method, and it also allows movements to be controlled with the arrow keys and for trees to be collected.
The countdown method uses the variable in "initialize" and displays it as 3d text. It then waits one second and decreases the variable by 1 in result, creates a timer in the game.
TreeCollect uses the same code for each tree. It allows the wizard to "pick up" a tree and collect it. When a tree is collected it no longer shows. TreeCollect is called by an event rather than "myfirstmethod" because it must be active at all times when the wizard is moving.