|   |   | ZZT - OOP |   |   |
To type any codeing for any object you must open up the editor and type F2 and then O. To open the editor, press E when you open ZZT. Type in the name for your game and press enter. Type in the following code:
| @freddy | Tells the computer to call this program 'freddy' |
| Hello, how are you? | Writes this at the bottom of the screen |
| #end | Ends the program |
Save the program by pressing S and type MYGAME and press enter. Open it up by exiting the editor with ESC and run it like any other game. You will notice as soon as you run it by pressing P it will say "Hello how are you?" at the bottom in rainbow colours. Now lets make it so when the player touches it it says that. How? Only two more lines!
| @freddy | Tells the computer to call this program 'freddy' |
| #end | Ends the program until we ask it to. |
| Hello, how are you? | Writes this at the bottom of the screen |
| :touch | Starts the program again when we touch it |
| #end | Ends the program |
From these programs you should have learnt that you must start a program with an @ sign and write the name of the program next to it. Also that to make it say something you write it in. And that #end ends the program until we tell it to continue. And that :touch tells the computer to do something when the player touches it.