Alias Reference Trouble

Post » Wed Jul 31, 2013 5:52 am

I've wasted a long time now trying to solve this problem I have without luck. Now this forum is my only hope!

In a dialogue info's papyrus fragment I want to reset the akSpeakerRef totally in the end of the last response - this includes clearing the akSpeakerRef 's Alias which is the part I can't figure out how to do.

The Reset() function can't do this as far as I know, and it seems there doesn't exist a ClearAlias ObjectReference function.

Then I thought I could find the akSpeakerRef 's Alias with a GetAlias-kind of function that works like the GetReference function, and then use Clear() on this, but such a function exists neither it seems.

Please, think, ladies and gentlemen!

User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Post » Wed Jul 31, 2013 8:04 am

I just want to make sure I understand this correctly. In a dialogue fragment, you have akSpeaker in an alias and you want to clear that alias? If you already know the alias that akSpeaker is filling, you can simply make a property to that alias and use Clear() on that. If you don't know the specific alias, then I would recommend making a reference alias array property with all the possible aliases.

Ex:

Scriptname _test_testscript extends QuestReferenceAlias[] Property kAliases AutoFunction FindAndClearAlias(ObjectReference akSpeaker)    int iElement = kAliases.Length    while iElement        iElement -= 1        ObjectReference kTempRef = kAliases[iElement].GetReference()        if akSpeaker == kTempRef            kAliases[iElement].Clear()            return        endIf    endWhileendFunction
User avatar
Danial Zachery
 
Posts: 3451
Joined: Fri Aug 24, 2007 5:41 am


Return to V - Skyrim