2021-10-05 22:15:58 +00:00
|
|
|
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()
|
2023-12-08 02:57:30 +00:00
|
|
|
Actor akElfride = Alias_Elfride.GetActorReference()
|
2021-10-05 22:15:58 +00:00
|
|
|
If akElfride.IsDisabled() ; For backward compatibility
|
|
|
|
PutElfrideToCage()
|
2024-01-09 22:00:18 +00:00
|
|
|
_00E_Func_WaitForRef.WaitForReferenceToLoad(akElfride)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
_00E_NQ10_ElfriedeCageRef.Lock(0)
|
|
|
|
_00E_NQ10_ElfriedeCageRef.SetOpen(True)
|
|
|
|
_00E_ElfriedeMoohMarker.Play(akElfride)
|
|
|
|
|
2023-12-08 02:57:30 +00:00
|
|
|
Actor akEshra = Alias_Eshra.GetActorReference()
|
2021-10-05 22:15:58 +00:00
|
|
|
akEshra.MoveTo(EshraPortRef)
|
|
|
|
Debug.SendAnimationEvent(akEshra, "IdleForceDefaultState")
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function FinishQuest()
|
|
|
|
; Start end travel for Eshra
|
2023-12-08 02:57:30 +00:00
|
|
|
Actor akEshra = Alias_Eshra.GetActorReference()
|
2024-01-09 22:00:18 +00:00
|
|
|
_00E_Func_SafeMove.DistanceFailsafeMoveTo(Alias_Elfride.GetActorReference(), akEshra, 256.0)
|
2023-12-08 02:45:53 +00:00
|
|
|
akEshra.SetActorValue("Variable01", 1.0)
|
2021-10-05 22:15:58 +00:00
|
|
|
RegisterForSingleUpdateGameTime(1.0)
|
|
|
|
|
|
|
|
Alias_CageDoor.Clear()
|
|
|
|
|
|
|
|
; Cleanup
|
|
|
|
_00E_NQ10_ElfriedeCageRef = None
|
|
|
|
EshraPortRef = None
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function PutElfrideToCage()
|
2023-12-08 02:57:30 +00:00
|
|
|
Actor akElfride = Alias_Elfride.GetActorReference()
|
2021-10-05 22:15:58 +00:00
|
|
|
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()
|
|
|
|
|
2023-12-08 02:57:30 +00:00
|
|
|
Actor akEshra = Alias_Eshra.GetActorReference()
|
2023-12-08 02:45:53 +00:00
|
|
|
akEshra.SetActorValue("Variable01", 0.0)
|
2021-10-05 22:15:58 +00:00
|
|
|
akEshra.EvaluatePackage()
|
|
|
|
|
2023-12-08 02:57:30 +00:00
|
|
|
Actor akElfride = Alias_Elfride.GetActorReference()
|
2021-10-05 22:15:58 +00:00
|
|
|
akElfride.RemoveFromFaction(NoFeedingIdleFaction)
|
|
|
|
EndFunction
|