Script Language


The AGAST Script Language looks similar to the C language, but it has the completely different purpose of directing the flow of an adventure game. Like C, it allows one to declare and modify variables, define and call functions (called scripts in AGAST), and code loops and branches of execution. Unlike C, it has many special-purpose constructs for adventure game scripting. Such features include an event-driven model, concurrent script execution, and object-based (but not oriented) programming.

Conventions

Here are some general conventions and concepts of the AGAST script language.

Declarations

Script files are the actual text files that are translated by the compiler, and they contain definitions for events, scripts, objects, variables, etc.

Statements

Statements are commands that appear inside a declaration's code block. Each statement performs some simple action. Statements are executed one after the other until the script ends.

Expressions

Most statements may include one or more expressions. Expressions are evaluated according to operator precedence and return a single integer value.

Predefined Functions and Properties

Predefined functions and properties are used to control all aspects of the interpreter's operation. They fall into these categories: