Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

User Guide

Writing Game Script

So you want to make a Click To Speak game. Here's a guide to getting started.

...

After exiting the character box, you're in the main editor:

At the moment, there 's is only one space visible for a line of dialogue. This will be the first line played when a user starts the game. The drop-down box to the left allows you to assign the dialogue to a character. You can have either the PC or the NPC speak first, but the player only gets to do something when the NPC is talking, so in this case Dr. Nefarious will speak first.

In the NPC's lines, we use asterisks (*) to break up the line into sections. During the game, when the player hits the button the PC will interrupt with a response, which will change based on which section of the NPC's line was playing when the button was pressed.

Image Modified

Adding Audio

To add an audio file to go with the NPC's line, click on the button marked Audio on the right. This will display the audio options. You can hide them by clicking Audio again.

Image Modified

Clicking the button marked Browse lets you select an audio file to play for this line, which will be displayed as a waveform. You can hear the clip using the Play button, and the Clear button clears away the audio file.

The editor will count the number of asterisks in the line and use that number to determine how many breakpoints to put in the audio clip. The breakpoint markers divide the audio line into sections the same way the asterisks divide the text line. By default, the audio breakpoints are evenly spaced, but you can click and drag them to any part of the clip you want.

Image Modified

Adding More Lines

Now let's add more lines. Clicking the arrow button to the left of the text box will open up more text input boxes. Again, the number is determined by the number of asterisks in our first text line. These new boxes are for the PC's responses to the NPC's line.

Image Modified

In our example, if the player pushes the button before the first breakpoint (anytime up to the words "Agent 008"), the PC will say "The crocodile pit again? Couldn’t you at least come up with something new?" If the player pushes the button between "nothing" and "plan", the PC will say "At your mercy? Come on, Doctor Nefarious, you know I always escape from these things." If the player interrupts after that, the PC will say, "Diabolical plan? What was it this time, trying to steal Christmas?" All of these lines will need to be assigned their own audio files so that they're playable in the final game.

Because these lines are spoken by the PC, they should not contain asterisks, since there should be only one possible response to each of them. For example, if Agent 008 says "The crocodile pit again? Couldn’t you at least come up with something new?", Dr. Nefarious will always respond "Ah, but I have! This time the pit is filled with... mutant crocodile-monkeys!"

Image Modified

The Exceptions Tab

You may have noticed the Exceptions tab near the top of the editor. While the Main Script tab is for the main body of the dialogue, the Exceptions tab covers some other features of the game.

Image Modified

Default Timeout Prompt contains a clip that plays if the player does not push the button before the end of an NPC's line. The game will wait a few seconds, then play this sound to remind the player to push the button.
End Game contains a clip and/or text message that will played/printed at the end of the game.
Background Music is an audio file that will play constantly in the background during the game.

If you want a text version of your dialogue tree, go to File -> Save Text Copy and save as a .txt file. You should now be able to view it in any standard text editor. This is useful for reading over your dialogue and for when you need a copy to hand off to voice actors.

Image Modified

Playing the Game

Finally, you'll want to test your game. First, go to File -> Save in TextEditor3 and save as a .xml file. Next, start the ClickToSpeak application.

Image Modified

Click Load Game and select the file you just saved. Click Start Game. Use the big red button in the center when you want to interrupt!

...