Difference between revisions of "Bethesda Tutorial Dialogue"

162 bytes added ,  05:21, 27 February 2012
→‎Scripting Dialogue: I built a quest using this tutorial. It didn't work. It took me a week of pulling my hair out before I got the help I needed. I have amended the code to fix the problem I was having.
imported>Electrosheep
m (Giving a little more information about recording something for the temp track)
imported>AlexanderKenneth
(→‎Scripting Dialogue: I built a quest using this tutorial. It didn't work. It took me a week of pulling my hair out before I got the help I needed. I have amended the code to fix the problem I was having.)
Line 128: Line 128:
At the bottom of this window, you see fields for Scripts marked "Begin" and "End." The Begin script runs when the NPC starts saying the line, and the End script will run when he finishes. (In scripting terminology, these little pieces of script are called "script fragments" - see [[Topic_Info_Fragments|Topic Info Fragments]] for more details.)
At the bottom of this window, you see fields for Scripts marked "Begin" and "End." The Begin script runs when the NPC starts saying the line, and the End script will run when he finishes. (In scripting terminology, these little pieces of script are called "script fragments" - see [[Topic_Info_Fragments|Topic Info Fragments]] for more details.)


In the End field, enter this script command: <code>GetOwningQuest().SetStage(10)</code>
In the End field, enter this script command:  
<code>
GetOwningQuest().SetObjectiveDisplayed(10)
GetOwningQuest().SetStage(10)</code>
 
You don't need to worry about the <code>SetObjectiveDisplyed(10)</code> part yet. It is used later on in the quest.


The <code>SetStage(10)</code> portion, as you might expect, sets a quest's current stage to 10. The <code>GetOwningQuest()</code> part just says that the quest we care about is the one that contains this dialogue. (Sometimes you might want a line in your quest to muck around in a different quest, so we have to be specific.)
The <code>SetStage(10)</code> portion, as you might expect, sets a quest's current stage to 10. The <code>GetOwningQuest()</code> part just says that the quest we care about is the one that contains this dialogue. (Sometimes you might want a line in your quest to muck around in a different quest, so we have to be specific.)