by Jimmyjay86
First of all make your speech text file. For this example I am going to use something simple - an NPC asks you if you want to join him on a trek for which there is a yes or no possibility. You can have more than two options depending on how complex you want to get. Just make sure you create concise sprites and entities for all of the options.
Hippo_0 = {Do you think you'd like to
join me on a pilgrimage to the Parthenon?}
Hippo_1_Yes = {Alright, let me saddle up my brahmin and then
follow me.}
Hippo_1_No = {I see... Well then perhaps we will meet again
somewhere in the wastes.}
Yes_1 = {Yes, I've never been to Rome.}
No_1 = {Nah, I'm going to find something to kill.}
Save the speech file and open up your map in the editor. Link the text file with the "Speech File" button and then open up the speech editor to input the five nodes as shown below.
Then go to the trigger editor to script the triggers that will make the whole event work. The sequence of events is that you click Hippocrates and he says speech node Hippo_0. The yes and no sprites will appear and you must then click on one. Choosing one will make your speech appear. Then both options disappear and Hippocrates speech is switched to the appropriate node based on your choice. You can continue on with various branches on the speech tree if you would like an involved conversation. Of course you should map the whole thing out in advance or you will get lost on complex speech trees.
For this example there were three triggers required; Hippocrates Speaks, Choose Yes, and Choose No. The first one's trigger action is shown and the condition is simple - "Speech Event Hippo-0 Occured". The other triggers deactivate the text entities when you make a choice and change Hippocrates click speech as noted above.
Now on to the map entities. The yes and no entities are placed off map and given tag names such as "Yes" and "No" and I also gave them separate player indices. There are different ways to do this but I think this is the simplest. Hippocrates has a separate player index and is also given a tag name of "Hippocrates". Place the waypoints close by the NPC and set them to Index 0. Experiment with placement to get the best effect. Make sure there is no speech overlap when playing. Name the waypoints with appropriate tag-names - I always end all of my waypoints with "way".
That's all. Save your map and open it in the game to see how it works! And you can use OTB's method for speech text coloring to differentiate the NPC speech from your character's.
Ok, sorry - I know the Parthenon is in Paris not Rome : P ! Special thanks to Endocore for developing the clone-system which led to this method. Now let's show everyone what FOT is capable of......
May 23, 2002