Difference between revisions of "Papyrus Introduction"

No change in size ,  15:32, 6 August 2023
m (→‎States: Changed the assumed masculine pronoun used here, "he", to "they." Also fixed a minor grammar point, "spam on", to simply just "spam.")
Tags: Mobile web edit Mobile edit
 
Line 368: Line 368:


==Writing Custom Functions==
==Writing Custom Functions==
We'll get into the nitty gritty of writing Custom functions by looking at an example of something we might want to do while writing a quest: handle the death of the quest giver.
We'll get into the nitty gritty of writing custom functions by looking at an example of something we might want to do while writing a quest: handle the death of the quest giver.


A function has a start/end line (Function/EndFunction) may contain parameter definitions. In this case lets create a function called "HandleQuestGiverDeath" that takes a parameter of the actor who did the killing, so we can do different things if the player killed him, or something else. We'll write this function on a script "myQuestScript" that we'll attach to our quest in the editor.
A function has a start/end line (Function/EndFunction) may contain parameter definitions. In this case lets create a function called "HandleQuestGiverDeath" that takes a parameter of the actor who did the killing, so we can do different things if the player killed him, or something else. We'll write this function on a script "myQuestScript" that we'll attach to our quest in the editor.
Anonymous user