GetAliasByName - Quest

From Creation Kit
Jump to: navigation, 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

Alias GetAliasByName(String name)

Parameters

  • name: The Alias Name of the desired Alias.

Return Value

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

Examples

; 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

See Also