Jump to content

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


TravelerHD

Recommended 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()
Link to comment
Share on other sites

  • Recently Browsing   0 members

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