4
Fork 0

Moved WaitForReferenceToLoad()

remove-levelsystem
Eddoursul 4 months ago
parent 6c46a2350c
commit 43280978ee
  1. BIN
      scripts/_00E_Func_WaitForRef.pex
  2. BIN
      scripts/_00e_fs_nqr05_bossfight_tharaelsc.pex
  3. BIN
      scripts/_00e_fs_nqr05_functions.pex
  4. BIN
      scripts/_00e_game_oorbayaspawnsc.pex
  5. BIN
      scripts/_00e_mq07a_functions.pex
  6. BIN
      scripts/_00e_mq11a_functions.pex
  7. BIN
      scripts/_00e_mq12b_functions.pex
  8. BIN
      scripts/_00e_mq14_functions.pex
  9. BIN
      scripts/_00e_nq10_functions.pex
  10. BIN
      scripts/_00e_nq15functions.pex
  11. BIN
      scripts/_00e_nq26_questfunctions.pex
  12. BIN
      scripts/_00e_phasmalist_workbench.pex
  13. BIN
      scripts/_00e_playerhousing_mannequincontrol.pex
  14. BIN
      scripts/_00e_questfunctions.pex
  15. 11
      source/scripts/_00E_Func_WaitForRef.psc
  16. 2
      source/scripts/_00e_fs_nqr05_bossfight_tharaelsc.psc
  17. 2
      source/scripts/_00e_fs_nqr05_functions.psc
  18. 2
      source/scripts/_00e_game_oorbayaspawnsc.psc
  19. 2
      source/scripts/_00e_mq07a_functions.psc
  20. 10
      source/scripts/_00e_mq11a_functions.psc
  21. 4
      source/scripts/_00e_mq12b_functions.psc
  22. 6
      source/scripts/_00e_mq14_functions.psc
  23. 2
      source/scripts/_00e_nq10_functions.psc
  24. 2
      source/scripts/_00e_nq15functions.psc
  25. 2
      source/scripts/_00e_nq26_questfunctions.psc
  26. 2
      source/scripts/_00e_phasmalist_workbench.psc
  27. 2
      source/scripts/_00e_playerhousing_mannequincontrol.psc
  28. 10
      source/scripts/_00e_questfunctions.psc

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,11 @@
Scriptname _00E_Func_WaitForRef Hidden
Function WaitForReferenceToLoad(ObjectReference ref) Global
Int maxIterationsToWait = 180
While ref.Is3DLoaded() == False && maxIterationsToWait > 0
; Utility.Wait(0.02)
maxIterationsToWait -= 1
EndWhile
EndFunction

@ -198,7 +198,7 @@ EndFunction
Function Teleport(ObjectReference objLocation)
FS_NQR05_TharaelREF.MoveTo(objLocation)
_00E_QuestFunctions.WaitForReferenceToLoad(FS_NQR05_TharaelREF)
_00E_Func_WaitForRef.WaitForReferenceToLoad(FS_NQR05_TharaelREF)
MAGIllusionReleaseAimedSDM.Play(FS_NQR05_TharaelREF)
_00E_FS_NQR05_TharaelMaterializeFXS.Play(FS_NQR05_TharaelREF)

@ -1480,7 +1480,7 @@ Function TeleportFather()
FS_NQR05_TharaelREF.Disable()
FS_NQR05_SC30_TharaelCorpseREF.PlaceAtMe(FXDragonPriestSmallExplosion)
FS_NQR05_SC30_TharaelCorpseREF.Enable()
_00E_QuestFunctions.WaitForReferenceToLoad(FS_NQR05_SC30_TharaelCorpseREF)
_00E_Func_WaitForRef.WaitForReferenceToLoad(FS_NQR05_SC30_TharaelCorpseREF)
FS_NQR05_SC30_TharaelCorpseREF.SetMotionType(4)
_00E_BloodyFXShader.Play(FS_NQR05_SC30_TharaelCorpseREF)

@ -48,7 +48,7 @@ Function InitializeOorbaya(Actor akParent, Actor akKiller)
akOorbaya.SetActorValue("Magicka", akParent.GetBaseActorValue("Magicka") * __Config_fOorbayaStrength)
akOorbaya.SetActorValue("Stamina", akParent.GetBaseActorValue("Stamina") * __Config_fOorbayaStrength)
_00E_QuestFunctions.WaitForReferenceToLoad(akOorbaya)
_00E_Func_WaitForRef.WaitForReferenceToLoad(akOorbaya)
Debug.SendAnimationEvent(akOorbaya, "summonStart")
_00E_NPCOorbaya_RoarM.Play(akOorbaya)

@ -549,7 +549,7 @@ Function TeleportMage()
_00E_NPCTeleportExplosionIMOD.Apply()
MQ07a_SC10_MageREF.Enable()
MQ07a_SC10_MageREF.MoveTo(MQ07a_SC9_MageAppearMarker)
_00E_QuestFunctions.WaitForReferenceToLoad(MQ07a_SC10_MageREF)
_00E_Func_WaitForRef.WaitForReferenceToLoad(MQ07a_SC10_MageREF)
Debug.sendAnimationEvent(MQ07a_SC10_MageREF, "IdleWebEnterInstant")
MQ07a_SC10_MageREF.setActorValue("Variable03", 5)
TimeFadeOut01FXS.Stop(MQ07a_SC10_MageREF)

@ -396,7 +396,7 @@ Function SpawnAnomaly()
XPlosionMarker.MoveTo(MQ11a_AnomalyREF, 0.0, 0.0, 100)
XPlosionMarker.PlaceAtMe(_00E_MQ11a_AnomalySpawnExplosion, 1)
_00E_QuestFunctions.WaitForReferenceToLoad(MQ11a_AnomalyREF)
_00E_Func_WaitForRef.WaitForReferenceToLoad(MQ11a_AnomalyREF)
int ScreamSound = _00E_NPCMagicAnomalyScreamM.Play(MQ11a_AnomalyREF)
Sound.SetInstanceVolume(ScreamSound, 3.0)
@ -440,7 +440,7 @@ Function StartLeftTowerVision01()
_00E_PlayerFunctions.GetVisionControl().VisionEffectNoTimestop(_00E_MQ11a_SC11_VisionRefs, _00E_MQ11a_SC8_FreezeRefs)
MQ11a_SC11_SilverJugGoblets.MoveTo(MQ11a_SC11_XMarkerGoblets)
_00E_QuestFunctions.WaitForReferenceToLoad(MQ11a_SC11_SilverJugGoblets)
_00E_Func_WaitForRef.WaitForReferenceToLoad(MQ11a_SC11_SilverJugGoblets)
MS04MemoryFXBody01VFX.Play(MQ11a_SC11_SilverJugGoblets)
EndFunction
@ -620,7 +620,7 @@ Function StartMayaVision()
MQ11a_SC12_StarlingBarrierREF.Disable()
MQ11a_SC13_MayaREF.MoveTo(MQ11a_SC13_MayaMoveToMarker)
_00E_QuestFunctions.WaitForReferenceToLoad(MQ11a_SC13_MayaREF)
_00E_Func_WaitForRef.WaitForReferenceToLoad(MQ11a_SC13_MayaREF)
MS04MemoryFXBody01VFX.Play(MQ11a_SC13_MayaREF)
_00E_PlayerFunctions.GetVisionControl().VisionEffectNoTimestop(_00E_MQ11a_SC13_VisionRefs, _00E_MQ11a_SC8_FreezeRefs)
@ -1277,7 +1277,7 @@ Function CallTableVision()
_00E_PlayerFunctions.GetVisionControl().VisionEffectNoTimestop(_00E_MQ11a_SC24_VisionRefs, _00E_MQ11a_SC24_FreezeRefs)
_00E_QuestFunctions.WaitForReferenceToLoad(MQ11a_SC23_MayaAtTable)
_00E_Func_WaitForRef.WaitForReferenceToLoad(MQ11a_SC23_MayaAtTable)
MS04MemoryFXBody01VFX.Play(MQ11a_SC23_MayaAtTable)
(PlayerREF as _00E_PlayerFunctions).StopRandomHeadTracking()
@ -1384,7 +1384,7 @@ Function MoveVeiledWoman()
_SafeMoveNPCtoFurniture(MQ11a_SC25_VeiledWomanREF, MQ11a_SC25_VeiledWomanStart)
MQ11a_SC25_VeiledWomanREF.SetAlpha(0.0)
_00E_QuestFunctions.WaitForReferenceToLoad(MQ11a_SC25_VeiledWomanREF)
_00E_Func_WaitForRef.WaitForReferenceToLoad(MQ11a_SC25_VeiledWomanREF)
MS04MemoryFXBody01VFX.Play(MQ11a_SC25_VeiledWomanREF)
MQ11a_SC25_VeiledWomanREF.SetAlpha(0.5, True)

@ -631,7 +631,7 @@ Function FadeInSamael()
MQ12b_SC11_SamaelBarrierREF.Enable()
_00E_MAGEldritchExplosionImod.Apply()
Game.ShakeCamera(afStrength = 0.1)
_00E_QuestFunctions.WaitForReferenceToLoad(MQ12b_SC11_SamaelBarrierREF)
_00E_Func_WaitForRef.WaitForReferenceToLoad(MQ12b_SC11_SamaelBarrierREF)
MAGConjurePortal.Play(MQ12b_SC11_SamaelBarrierREF)
MQ12b_SC11_SamaelBarrierREF.PlayAnimation("playanim02")
bBarrierFailsave = True
@ -774,7 +774,7 @@ EndFunction
Function TeleportYuslanToGate()
Wait(2)
_00E_Func_SafeMove.SafeMoveTo(_00E_MC_YuslanRef, MQ12b_SC12_YuslanTeleportMarker)
_00E_QuestFunctions.WaitForReferenceToLoad(_00E_MC_YuslanRef)
_00E_Func_WaitForRef.WaitForReferenceToLoad(_00E_MC_YuslanRef)
TimeFadeIn01FXS.Play(_00E_MC_YuslanRef)
Debug.sendAnimationEvent(_00E_MC_YuslanRef, "IdleWebEnterInstant")
_00E_MC_YuslanRef.SetActorValue("Variable03", 5)

@ -338,7 +338,7 @@ Function StartCombatWithPlayer()
PhasmalistControlQuest.TeleportApparitionToPlayer()
Actor akApparition = PhasmalistControlQuest.GetApparitionRef()
If akApparition
_00E_QuestFunctions.WaitForReferenceToLoad(akApparition)
_00E_Func_WaitForRef.WaitForReferenceToLoad(akApparition)
akApparition.StartCombat(MQ14_SC04_Keeper01REF)
EndIf
EndIf
@ -424,7 +424,7 @@ Function FillTraitorScene()
akCurrentActor.UnequipItem(Torch01, true, false)
akCurrentActor.RemoveItem(Torch01, 99)
akCurrentActor.MoveTo(MQ14_SC06_StandMarkerFormlist.GetAt(iIndex) as ObjectReference)
_00E_QuestFunctions.WaitForReferenceToLoad(akCurrentActor as ObjectReference)
_00E_Func_WaitForRef.WaitForReferenceToLoad(akCurrentActor as ObjectReference)
Debug.SendAnimationEvent(akCurrentActor, "IdleStop_Loose")
SC06_AvoidNPCArray[iIndex].ForceRefTo(akCurrentActor)
akCurrentActor.SetLookAt(MQ14_SC06_TraitorRef)
@ -435,7 +435,7 @@ Function FillTraitorScene()
; SE: Moved teleporting MQ14_SC06_FlammentrunkREF to the beginning of his scene package, he goes home if teleported at this point
_00E_QuestFunctions.WaitForReferenceToLoad(MQ14_SC06_TraitorRef as ObjectReference)
_00E_Func_WaitForRef.WaitForReferenceToLoad(MQ14_SC06_TraitorRef as ObjectReference)
_00E_BloodyFXShader.Play(MQ14_SC06_TraitorRef)
EndFunction

@ -18,7 +18,7 @@ Function SetupFinalScene()
Actor akElfride = Alias_Elfride.GetActorReference()
If akElfride.IsDisabled() ; For backward compatibility
PutElfrideToCage()
_00E_QuestFunctions.WaitForReferenceToLoad(akElfride)
_00E_Func_WaitForRef.WaitForReferenceToLoad(akElfride)
EndIf
_00E_NQ10_ElfriedeCageRef.Lock(0)

@ -123,7 +123,7 @@ Function PortWoman()
NQ15Woman.MoveTo(NQ15WomanMarker)
; SE: Need to wait for 3D to load before playing the shader
_00E_QuestFunctions.WaitForReferenceToLoad(NQ15Woman)
_00E_Func_WaitForRef.WaitForReferenceToLoad(NQ15Woman)
_00E_TeleportReappearShader.Play(NQ15Woman)
; SE: The shader is short, 2 seconds is too long

@ -19,7 +19,7 @@ EndFunction
Function DisableGenerator()
NQ26CoreRef.Enable()
_00E_QuestFunctions.WaitForReferenceToLoad(NQ26CoreRef)
_00E_Func_WaitForRef.WaitForReferenceToLoad(NQ26CoreRef)
NQ26CoreRef.SetMotionType(4) ; Motion_Keyframed = 4: The object will NOT be simulated by Havok (will only move if forced to, through SetPosition() or TranslateTo())
NQ26CoreRef.MoveToMyEditorLocation()

@ -380,7 +380,7 @@ Function FinishPlacement()
PlaceableTankMarkerRef.Enable()
_00E_QuestFunctions.WaitForReferenceToLoad(PlaceableTankMarkerRef)
_00E_Func_WaitForRef.WaitForReferenceToLoad(PlaceableTankMarkerRef)
PlaceableTankMarkerRef.TranslateTo(mx, my, mz, 0, 0, fWorkbenchAngleZ + fOffsetAngleZ, FAST_TRANSLATION_SPEED, FAST_TRANSLATION_SPEED)

@ -226,6 +226,6 @@ Function FinishPlacement()
Enable()
_00E_QuestFunctions.WaitForReferenceToLoad(self)
_00E_Func_WaitForRef.WaitForReferenceToLoad(self)
ResetOnLoad()
EndFunction

@ -104,16 +104,6 @@ Function DisableDialogueQuitting() Global
Debug.Notification("Outdated _00E_QuestFunctions replacer detected!")
EndFunction
Function WaitForReferenceToLoad(ObjectReference ref) Global
Int maxIterationsToWait = 180
While ref.Is3DLoaded() == False && maxIterationsToWait > 0
; Utility.Wait(0.02)
maxIterationsToWait -= 1
EndWhile
EndFunction
;=====================================================================================
; GENERAL NON-GLOBAL FUNCTIONS

Loading…
Cancel
Save