Script Language: Statements: Print
|
![]() |
The print-statement is like a special function that can accept one or more arguments. When the print-statement is executed, the game is paused while the output appears in a text window, and the interpreter waits until the user presses the enter key, the space bar, or clicks any mouse button to continue. The first argument is the string to print. It can contain special output specifiers that determine the output format for the remaining arguments. The set of specifiers corresponds to the respective set of arguments, so the number of each must be equal. Otherwise "bad things" may happen.
String and decimal integers are by far the most common specifiers used in an adventure game. Binary, octal, and hexadecimal representations may be helpful for debugging. The appearance of the print box can be altered using print properties. Code Examples
|
![]() |
![]() ![]() ![]() ![]() ![]() |