So far we’ve controlled the behavior of the different objects in our games using events and actions. These actions let the instances of the object perform tasks when certain events occur in the game. In this chapter we are going to define those tasks in an alternative way: by using programs. Programs define tasks through lines of text called code that use functions instead of actions. This extends the scope of Game Maker considerably as there are only about 150 different actions but close to a thousand functions. These functions give you much more control than actions, allowing you to define precisely how tasks should be performed in different circumstances.