GetAlias - Quest

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Quest Script

Obtains the alias with the specified ID that is attached to this quest.

Syntax[edit | edit source]

Alias Function GetAlias(int iAliasID) native

Parameters[edit | edit source]

  • iAliasID: The ID number of the alias to retrieve (as shown in the hidden second column on the Quest Aliases tab)

Return Value[edit | edit source]

The Alias associated with the passed in ID, or None if the ID is invalid.

Examples[edit | edit source]

; Get alias 1 on the quest
Alias myAlias = SuperQuest.GetAlias(1)

Note[edit | edit source]

  • An alias's ID number is visible in the leftmost column in a quest's list of aliases. By default, that column is too narrow to be visible; you'll need to drag it to see the numbers.
    • Aliases are numbered in the order they are created; however, if an alias is deleted, its ID number is never reused.
  • The alias ID number is not something that is easily visible in the editor, it's much more consistent and reliable to set up a property for the alias you want and fill it in the editor properties window.
  • Remember that this returns an Alias, not a ReferenceAlias. If you're trying to retrieve a reference alias, you'll need to cast the returned result to the ReferenceAlias type.

See Also[edit | edit source]