GetAliasByName - Quest

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Quest Script

Obtains the alias with the specified name that is attached to this quest. This is the name appearing in the Alias Name field of the Reference Alias form.

Syntax[edit | edit source]

Alias GetAliasByName(String name)

Parameters[edit | edit source]

  • name: The Alias Name of the desired Alias.

Return Value[edit | edit source]

The Alias associated with the name, or None if the reference is not found.

Examples[edit | edit source]

; given a series of references named Ref1, Ref2.. RefN, find the first unfilled reference
ReferenceAlias function findEmptyRef()
	int ndx = 0
	ReferenceAlias ref

	while true
		ndx += 1
		ref = memberQuest.getAliasByName("Ref"+ndx) as ReferenceAlias
		if !ref || !ref.getReference() 
			return ref ; returns the open reference or none
		endif
	endwhile
endfunction

Notes[edit | edit source]

See Also[edit | edit source]