Quest Stage Fragments

From the CreationKit Wiki
Revision as of 16:02, 21 February 2024 by Xieve (talk | contribs) (→‎Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Type[edit | edit source]

Quest stage fragment scripts extend Quest.

Run Time[edit | edit source]

Quest stage fragments are run when quest stages start.

Special Variables[edit | edit source]

  • kmyQuest: This can be set to be a script on the quest this fragment is attached to, providing easy access to that script's properties. You should set the dropdown box first before adding the kmyQuest variable to your script, otherwise you may get a compiler error.
    • This can be a little hard to understand, so here's a quick example. Lets say a quest script has 1 property and one function. To access either of them, you do this:
kmyQuest.MyScriptProperty
kmyQuest.MyScriptFunction()
  • This allows access to script variables also.

Notes[edit | edit source]

  • When a quest is first created, the quest fragment script box is greyed out until you close and open the quest.
  • It is also greyed out if you don't have a log entry added.
  • When a quest fragment script is first created, it isn't possible to add properties to it. You must first close the Quest dialog window and then reopen it before adding properties to the script. If you add a simple function, e.g. Game.GetPlayer(), you'll be able to close the window without compiling errors. Then reopen and replace the function with your own, and you should be able to edit the properties at this point.

See Also[edit | edit source]