Editing
Complete Example Scripts
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=A Quest item you can drop and pick up again and set or reset objectives and Stages.= <syntaxhighlight lang="papyrus"> ScriptName DroppableQuestObject Extends ObjectReference Event OnContainerChanged(ObjectReference NewContainer, ObjectReference OldContainer) If FromQuest.GetStage() < StageToStopQuestItem ; Are we a quest item at the current stage? If OldContainer == PlayerREF FromQuest.SetObjectiveDisplayed(ObjectiveToDisplayOnDrop, True, True) FromQuest.SetObjectiveDisplayed(ObjectiveToHideOnDrop, False) ; Uncomplete the objective completed on pickup. If UncompleteEnable FromQuest.SetObjectiveCompleted(ObjectiveToCompleteOnPickup, False) EndIf If StageToSetOnDrop >= 0 FromQuest.SetStage(StageToSetOnDrop) EndIf ElseIf NewContainer == PlayerREF FromQuest.SetObjectiveDisplayed(ObjectiveToDisplayOnPickup, True, True) FromQuest.SetObjectiveCompleted(ObjectiveToCompleteOnPickup) If StageToSetOnPickup >= 0 FromQuest.SetStage(StageToSetOnPickup) EndIf EndIf Else ; Nope, we're not a quest item at this stage. EndIf EndEvent Actor Property PlayerREF Auto Quest Property FromQuest Auto ; Set this to the quest the item is a quest item for. Bool Property UncompleteEnable Auto ; If true, "uncomplete" the objective completed on pickup when dropped. Int Property StageToStopQuestItem = 99999 Auto ; At this stage or later, it effectively ceases to be a quest item anymore. Int Property StageToSetOnPickup = -1 Auto ; When item is picked up, set this stage in the quest (Defaults to No Stage) Int Property ObjectiveToDisplayOnPickup Auto ; What objective should be displayed when item is picked up by the player? Int Property ObjectiveToCompleteOnPickup Auto ; Usually the "Get this item" objective. Int Property StageToSetOnDrop = -1 Auto ; If player drops the item, what stage do we "go back" to? Int Property ObjectiveToDisplayOnDrop Auto ; Re-display the objective to "get" the object. Int Property ObjectiveToHideOnDrop = -1 Auto ; Should be the same as ObjectiveToDisplayOnPickup, ideally. </syntaxhighlight> To use this script: attach it to the item you want to use, and set the properties accordingly, assigning the quest, Objectives, and Stages involved. For example, let's say that in the quest "StarsAndGarters", the garter belt of Wootazootamootagoota The Tense is set in stage 10 as Objective 10, and Displays Objective 20 "Place the belt on the statue", and sets stage 20 when picked up, and you want to go back to stage 10 if the player drops it. And after stage 30 (Player has put the belt on the statue) it no longer matters what happens to it. You would set your properties as follows: FromQuest: StarsAndGarters UncompleteEnable: True StageToStopQuestItem: 30 StageToSetOnPickup: 20 StageToSetOnDrop: 10 ObjectiveToDisplayOnPickup: 20 ObjectiveToCompleteOnPickup: 10 ObjectiveToDisplayOnDrop: 10 ObjectiveToHideOnDrop: 20
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values