Game Development Reference
In-Depth Information
Table 13-1. The Conversation Tree for the First Prisoner Flynn Encounters
ID
Speaker
Speech
Next
1
NPC
Oh, please set me free. Help a poor boy down on his luck.
2
2
Archie
Ha. I bet you got yerself into this mess. We haven't got time to release
you.
3
3
NPC
Oh, but I can help you. I see everything that goes on from up here.
4
4
Flynn
Will you help me with some information? We're looking for
someone.
Who are you and how did you end up in that cage?
5
6
5
NPC
Of course. You save my hide and I'll tell you what you need to
know.
7
6
NPC
I was the ship's boy on the Spice Queen. They're holding me for
ransom, but my family hasn't got any money.
7
7
Flynn
Have you seen a woman called Mary Jones? She's... a pirate.
We're looking for the Pirate King. Is he here in the town?
8
9
8
NPC
Mary Jones? I know her. Set me free and I'll tell you exactly where to
go.
10
9
NPC
Sounds like you're looking for trouble. I can tell you where to find
him, but first you gotta help me out.
10
10
Archie
He's a liar. The boy knows nothing.
11
11
Flynn
You're probably right Archie, perhaps we should leave him.
Maybe so, but we can't leave him here.
12
13
12
NPC
I promise I can help you. I will die in this cage if you don't free me.
Find the key to release that wheel up there.
End
13
NPC
You won't regret it mate. Find the key to release that wheel up
there.
End
Linear spoken sequences of text set the speak variable of the first global text instance
( global.text1.speak ) to the string that should be spoken, and set the next_sequence1
variable to the next sequence in the dialogue.
Branching sequences of text set the select variables of both global text objects
( global.text1.select and global.text2.select ) to the appropriate strings and set
both the next_sequence1 and next_sequence2 variables depending on the outcome
of each choice of dialogue.
Note that each sequence starts with a value of 0 and ends with a value of 999 .
10. It's also worth considering the following lines that appear at the beginning of the
code for the Step event:
if( global.text1.timeout == true )
event_perform( ev_other, ev_user0 );
The text object will use a timeout variable to record when the text has been
displayed in full for a reasonable amount of time. Therefore, this code automatically
calls the User Defined 0 event when this variable gets set.
 
Search WWH ::




Custom Search