Declarations

Before you get into this tutorial, you should first have at least a basic understanding of the existence of Control Declarations. If you don’t, click this conveniently placed link, which tells you all you need to know.

If you've read past that knowledge checkpoint, I will assume that you do, at least, somewhat understand how Control Declarations work, even if it is on a very basic level. Given that liberty, I will introduce you to

Declarations
A  is a line of code that, when ran, makes itself true. An example of a declaration would be: This  would, upon being ran, add 64 to the specified object's   value. are the fundamental working grounds of all languages, and thus are very simple in nature.

Examples

 * 1) Makes the specified object's  value equal to 64.
 * 2) Makes player one Luigi.
 * 3) Makes player one's  speed equal to negative five (so, moving upwards).

Now that you know how to, I bring you one of the very building blocks of all coding languages;

If Statements
The  statement is a very common statement; one that you can find in a vast majority of coding languages, and Teascript is no different. statements are formatted as such: This is a basic if statement, with one  and one. A  is what's being checked, and a   is what will be done if the condition is met. Using this alone, you can make scripts that control players, npcs, and more. Here's an example of a functioning  statement. Line 1,  first tells Teascript that you are using an   statement, via the use of , then asks if the player's coin count is greater than 50. Next, if the  is met, the language goes on to make the   true (in this case, it subtracts fifty coins from poor Mario). Whenever writing an  statement, you must first write the   next to the , and not the.

Examples

 * 1) Checks if the global variable  is 1, and if so, makes player one move backwards a pixel.
 * 2) Checks if the specified object's  is one, and if so, forces player one to move backwards and sets   to two.
 * 3) Checks if  is 1, and if so, adds one to.

This is, on a basic level, how most scripters do things in Teascript. And given how you've just learned how to do it; welcome to the world of Teascripting.