Difference between revisions of "GetQuest - Quest"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>CraftySentinel
(Created GetQuest)
 
imported>CraftySentinel
Line 18: Line 18:
==== Return Value ====
==== Return Value ====
The quest associated with the entered <tt>editorid</tt>, if no quest has the exact editor id this will return None.
The quest associated with the entered <tt>editorid</tt>, if no quest has the exact editor id this will return None.


== Notes ==
== Notes ==
Line 24: Line 23:


* This can be a good alternative to using [[GetFormFromFile - Game|'''GetFormFromFile''']] to return quests, or to check for a certain plugin to be present, as authors rarely change editor ids.
* This can be a good alternative to using [[GetFormFromFile - Game|'''GetFormFromFile''']] to return quests, or to check for a certain plugin to be present, as authors rarely change editor ids.


== Examples ==
== Examples ==

Revision as of 06:13, 2 November 2013

Defined in: Quest Script

Type: SKSE Global Function.


Returns the quest of the specified editor id, or None if none match.

Syntax

Quest Function GetQuest(string editorId) global native

Parameters

editorId

The editor id of the Quest you wish to get.

Return Value

The quest associated with the entered editorid, if no quest has the exact editor id this will return None.

Notes

  • Quests do not have to be running to be collected.
  • This can be a good alternative to using GetFormFromFile to return quests, or to check for a certain plugin to be present, as authors rarely change editor ids.

Examples

In this example a simple check is performed to check for Dragonborn.esm via a known quest:

;Check for a Dragonborn quest and implicitly cast the quest return to a boolean (None = False)
bool isDLC2Present = Quest.GetQuest("DLC2CultistAmbush")
	
If isDLC2Present
	;Perform Logic dependent on Dragonborn being present.
Else ;If it is not installed only one other possibility. 
	Debug.Trace("Dragonborn.esm was not present.")
EndIf


See Also