Talk:GetOwningQuest - Alias
I observe that calling this function can sometimes cause the Papyrus engine to halt.--Jaxonz (talk) 2015-02-04T11:53:44 (EST)
- Can you provide a little more information? This is a heavily used function. --Terra Nova2 (talk) 2015-01-20T09:04:17 (EST)
My observation comes from this loop, which checked objects to see if they were referenced by quests other than my own. Each object is minimally referenced by my quest as their ObjectReference is selected using Fill Type conditions of a ReferenceAlias in my quest.
int iNumRefAliases = (frmItem as ObjectReference).GetNumReferenceAliases() while iNumRefAliases > 0 Trace("beginning loop, iNumRefAliases:" + iNumRefAliases) iNumRefAliases -= 1 ReferenceAlias refAlias = (frmItem as ObjectReference).GetNthReferenceAlias(iNumRefAliases) as ReferenceAlias Trace("refAlias:" + refAlias) Quest qstOwning if refAlias qstOwning = refAlias.GetOwningQuest() EndIf Trace("qstOwning:" + qstOwning) if qstOwning != qstAlias ;some other quest is referencing return false ;exit the loop returning false EndIf EndWhile
In my observation, the function of my entire script would occasionally halt (including OnKeyDown events). The trace line "refAlias" was populated (not None) and always the last in my script log. It never got to the following "qstOwning" trace line.
This makes me believe there are occasions when the GetOwningQuest function can cause a halt in the execution of a script.
This testing was performed against baseline Skyrim with no mods other than SkyUI also loaded. --Jaxonz (talk) 2015-02-04T11:53:44 (EST)
Clarification to my original statement: The MCM menu script attached to my same mod quest continued to function, so it is probably not a halt to the entire Papyrus engine, just the script containing the call.--Jaxonz (talk) 2015-02-04T11:53:44 (EST)