Jump to content

Photo

Need Help with Scripting (running a script via dialog, papyrus fragments, and inventory management on an NPC)

papyrus script dialogue

  • Please log in to reply
10 replies to this topic

#11
dylbill

dylbill

    Faithful poster

  • Premium Member
  • 1,920 posts

Hmmm, that's an interesting take, I've only ever modded Bethesda games. Maybe I'll have to try something else. Going back to the original question, I found out If you put a script on the quest the fragment is in, you don't have to add the script as a property. If it's a quest stage fragment, you can put this in the fragment:

MyFollowerStartScript ScriptRef = Self as MyFollowerStartScript 
ScriptRef.SomeFunction() 

If the fragment is a dialogue fragment you can do: 

MyFollowerStartScript ScriptRef = GetOwningQuest() as MyFollowerStartScript 
ScriptRef.SomeFunction() 

This is handy if you're using the functions in the quest script in a bunch of different fragments or scripts, so you don't have to add the script as a property in each one. You can also use the properties already added in the quest script using the same method. 

ScriptRef.pMyCustomFollower.SomeFunction()






Also tagged with one or more of these keywords: papyrus, script, dialogue

Page loaded in: 1.172 seconds