A code is made of several parts. These parts include Statements, Functions, and Expressions. When used together you can create advanced codes and games. Read on to learn about each of these parts.
Statements
"In computer programming a statement can be thought of as the smallest standalone element of an imperativeprogramming language. A program is formed by a sequence of one or more statements." -Wikipedia
Statements help make up your game. A statement is a line of code such as variable = 4. There are many statements that can be used in game maker and each one has a different function. An "if" statement compares variables and numbers while the "and" statement can be used to compare another variable. The next chapter will explain statements in depth and their uses in game developent. ______________________________________________________________________________________________ EXAMPLE if variable == 5 and variable2 == 6 //This full line is considered a STATEMENT { (statement); } ______________________________________________________________________________________________
Expression
An expression is used to change variables or check if it is true.
______________________________________________________________________________________________ EXAMPLE if variable (Expression) 5 //An expression such as greater than replaces the blank. { (statement); } _____________________________________________________________________________________________
Functions
Functions pretty much control the game or program. Functions are the commands in the code such as move_to_point(45,36). Functions are used by typing the function name and its arguments.
Function(argument0,argument1.argument2)
Easy GML will teach you many of these "Functions." Check out the Function Database for more!