Let's create our first scripting routine. Click in the Source frame of the Script Designer window. A cursor appears, and we can type away. Routines follow this format:
Sub [name of routine] [things to do when this routine is triggered] End Sub
For instance, we're going to create a routine that introduces a new character.
Sub IntroduceCharacter End Sub
If you click anywhere else in the Script Designer window (or in the project tree), notice that IntroduceCharacter pops up in the Routines frame at the top right of the window.
Figure 7-6: IntroduceCharacter in the Routines window.
You could double-click on this routine to trigger it (though of course, it doesn't do anything yet). By the way, if our routines ever disappear from that Routines list, it means that our script has some kind of typographical error in it. We talk about that more when we get to debugging in a bit.