enderalse/source/scripts/_00e_nq10_functions.psc

68 lines
1.8 KiB
Plaintext

Scriptname _00E_NQ10_Functions extends Quest
ReferenceAlias Property Alias_Eshra Auto
ReferenceAlias Property Alias_Elfride Auto
ReferenceAlias Property Alias_CageDoor Auto
Sound Property _00E_ElfriedeMoohMarker Auto
Faction Property NoFeedingIdleFaction Auto
ObjectReference Property _00E_NQ10_ElfriedeCageRef Auto
ObjectReference Property EshraPortRef Auto
Event OnUpdateGameTime()
FinishEndTravel()
EndEvent
Function SetupFinalScene()
Actor akElfride = Alias_Elfride.GetActorRef()
If akElfride.IsDisabled() ; For backward compatibility
PutElfrideToCage()
_00E_QuestFunctions.WaitForReferenceToLoad(akElfride)
EndIf
_00E_NQ10_ElfriedeCageRef.Lock(0)
_00E_NQ10_ElfriedeCageRef.SetOpen(True)
_00E_ElfriedeMoohMarker.Play(akElfride)
Actor akEshra = Alias_Eshra.GetActorRef()
akEshra.MoveTo(EshraPortRef)
Debug.SendAnimationEvent(akEshra, "IdleForceDefaultState")
EndFunction
Function FinishQuest()
; Start end travel for Eshra
Actor akEshra = Alias_Eshra.GetActorRef()
_00E_QuestFunctions.DistanceFailsafeMoveTo(Alias_Elfride.GetActorRef(), akEshra, 256.0)
akEshra.SetAV("Variable01", 1.0)
RegisterForSingleUpdateGameTime(1.0)
Alias_CageDoor.Clear()
; Cleanup
_00E_NQ10_ElfriedeCageRef = None
EshraPortRef = None
EndFunction
Function PutElfrideToCage()
Actor akElfride = Alias_Elfride.GetActorRef()
akElfride.SetFactionRank(NoFeedingIdleFaction, 0)
akElfride.MoveToMyEditorLocation() ; Just in case
akElfride.Enable()
If Alias_CageDoor.GetRef() == None ; For backward compatibility
Alias_CageDoor.ForceRefTo(_00E_NQ10_ElfriedeCageRef)
EndIf
EndFunction
Function FinishEndTravel()
UnregisterForUpdateGameTime()
Actor akEshra = Alias_Eshra.GetActorRef()
akEshra.SetAV("Variable01", 0.0)
akEshra.EvaluatePackage()
Actor akElfride = Alias_Elfride.GetActorRef()
akElfride.RemoveFromFaction(NoFeedingIdleFaction)
EndFunction