Jump to content

How do I advance a quest by placing a unique item in a unique container?


Recommended Posts

Hey, instead of using Getform(FormID) just use an objectReference property and pick your container. Or, you could put a script directly on your container. It would look something like:

 

 

 

Scriptname MyModQuestContainerScript extends ObjectReference 

Form Property MyUniqueItem Auto 
Quest Property MyQuest Auto 

Event OnInit() 
    AddInventoryEventFilter(MyUniqueItem)
EndEvent

Auto State Waiting

    Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
        If (akSourceContainer as actor) == Game.GetPlayer()
            MyQuest.SetStage(20) 
            GoToState("Done")
        Endif 
    EndEvent 
EndState 

State Done 
EndState

Name the script something more unique, and don't forget to fill properties in the creation kit.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...