Difference between revisions of "Papyrus Introduction"

Jump to navigation Jump to search
1 byte added ,  18:51, 20 January 2012
m
→‎Example Script (extending ObjectReference): Grammar fix - added a missing apostrophe
imported>JBurgess
 
imported>Cipscis
m (→‎Example Script (extending ObjectReference): Grammar fix - added a missing apostrophe)
Line 35: Line 35:


=Example Script (extending ObjectReference)=
=Example Script (extending ObjectReference)=
For example, lets say you want to set a quest stage when the player hits a particular triggerbox. You would create a script called “MyTriggerBoxScript” that '''[[Extending_Scripts_(Papyrus)|extends]]''' “ObjectReference” and attach that to the triggerbox’s [[reference]] in the [[Render Window]]. You then create a Property called MyQuest, and point it to the your quest in the editor. Then you write your version of the OnTriggerEnter event, that calls set stage on the quest in the myQuest property.
For example, let's say you want to set a quest stage when the player hits a particular triggerbox. You would create a script called “MyTriggerBoxScript” that '''[[Extending_Scripts_(Papyrus)|extends]]''' “ObjectReference” and attach that to the triggerbox’s [[reference]] in the [[Render Window]]. You then create a Property called MyQuest, and point it to the your quest in the editor. Then you write your version of the OnTriggerEnter event, that calls set stage on the quest in the myQuest property.


<source lang="papyrus">
<source lang="papyrus">
Anonymous user

Navigation menu