User manual
F4-BMS 2.0 Technical Manual
APPENDIX I: INTERACTIVE TRAINING
Falcon 4 BMS 2.0 includes the ability to create interactive training missions. This is
accomplished by means of "training scripts." These scripts are text files that are loaded with the
training mission that contain the interactive training instructions.
To create a training script for a training mission, create a .txt file with the same name as the
training mission you want to write the script for. When the training mission loads, Falcon will
check for the existence of a training script file to go along with the mission and a checkbox
"Enable Training Script" will be available in the UI.
Training scripts are written in a simple programming language that is specifically designed to
make writing scripts easy.
BASIC CONCEPTS
There are a few basic concepts that are essential to writing training scripts.
¿ First, the script language has no concept of variables. All functions take actual values.
For the purpose of interactive training, this lack of variables in the language should not
be a significant limitation.
¿ Second, the language is designed to never block the main Falcon process. This is
accomplished by only running one command in the language per frame. One effect of
this is that bigger scripts do NOT slow the simulation down. This is because, regardless
of the size, only a single command executes per frame.
¿ Third, the exception to above is that certain functions can execute in "parallel" with
others. For example, there are two print commands. Both "Print" and "WaitPrint" put a
string on the screen for a set duration. The difference between the two is that "Print"
immediately moves onto the next command on the next frame. "WaitPrint" on the other
hand, pauses execution of the script until the time expires.
¿ Fourth, the code in a script can be divided into "sections" These sections are defined
by simply putting the name of the section on a line by itself.
¿ Fifth, the action of the language is composed entirely of functions. There are no
operators. So, each line of a script can contain one of the following things:
o A function name followed by arguments
o A section name
o A comment starting with //
o A blank line
151










