Fixed the decapitation vision in MQ16

This commit is contained in:
Eddoursul 2024-02-02 16:51:02 +01:00
parent 5a8ac4faa8
commit 408af4d341
5 changed files with 20 additions and 28 deletions

BIN
Vision fix.esp Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -98,7 +98,7 @@ Function VisionEffectTimestopStop(bool bMovementHasBeenLocked = False)
EndFunction
Function VisionEffectNoTimestop(Formlist RefsInvolved, Formlist ActorsToFreeze, bool bCustomMusic = False)
Function VisionEffectNoTimestop(Formlist RefsInvolved, Formlist ActorsToFreeze = None, bool bCustomMusic = False)
Game.ShowFirstPersonGeometry(False)
PlayerREF.SetAlpha(0.1)
@ -122,16 +122,16 @@ Function VisionEffectNoTimestop(Formlist RefsInvolved, Formlist ActorsToFreeze,
EndIf
if RefsInvolved != None
int iIndex = RefsInvolved.GetSize()
while iIndex > 0
iIndex -= 1
Actor VisionREF = RefsInvolved.GetAt(iIndex) as Actor
Int iIndex = 0
Form[] actors = RefsInvolved.ToArray()
While iIndex < actors.Length
Actor VisionREF = actors[iIndex] as Actor
if VisionREF.IsDisabled()
VisionREF.EnableNoWait()
EndIf
VisionRef.SetAlpha(0.5)
MS04MemoryFXBody01VFX.Play(VisionREF)
iIndex += 1
EndWhile
endif
@ -150,7 +150,7 @@ Function VisionEffectNoTimestop(Formlist RefsInvolved, Formlist ActorsToFreeze,
EndFunction
Function VisionEffectNoTimestopStop(Formlist RefsInvolved, Formlist ActorsToFreeze, bool bHasBeenRestrained = False)
Function VisionEffectNoTimestopStop(Formlist RefsInvolved, Formlist ActorsToFreeze = None, bool bHasBeenRestrained = False)
PlayerREF.SetAlpha(1.0)
Game.ShowFirstPersonGeometry(True)
@ -169,14 +169,14 @@ Function VisionEffectNoTimestopStop(Formlist RefsInvolved, Formlist ActorsToFree
EndIf
if RefsInvolved != None
int iIndex = RefsInvolved.GetSize()
while iIndex > 0
iIndex -= 1
Actor VisionREF = RefsInvolved.GetAt(iIndex) as Actor
Int iIndex = 0
Form[] actors = RefsInvolved.ToArray()
While iIndex < actors.Length
Actor VisionREF = actors[iIndex] as Actor
MS04MemoryFXBody01VFX.Stop(VisionREF)
VisionRef.SetAlpha(1)
EndWhile
VisionRef.SetAlpha(1)
iIndex += 1
EndWhile
endif
if ActorsToFreeze != None

View File

@ -494,31 +494,23 @@ EndFunction
Function StartVision_SC09()
int iSize = MQ16_SC09_VisionNPCs.GetSize()
_00E_MQ16_VisionIMOD.Apply()
while iSize > 0
iSize -= 1
_00E_VisionFX_NPC_SC visionNPC = MQ16_SC09_VisionNPCs.GetAt(iSize) as _00E_VisionFX_NPC_SC
visionNPC.SetAlphaAndFX()
endwhile
iVisionIntenseSound = _00E_MQ16_BattlefieldVisionM.Play(PlayerREF)
MQ16_SC09_VisionLinkREF.Enable()
_00E_PlayerFunctions.GetVisionControl().VisionEffectTimestop(True, True)
Wait(3)
_00E_PlayerFunctions.GetVisionControl().VisionEffectNoTimestop(MQ16_SC09_VisionNPCs)
MQ16_SC09_Vision_EnemyREF.PlayIdleWithTarget(pa_2HMKillMoveDecapSlash, MQ16_SC09_Vision_SoldierREF)
Wait(5)
Wait(5.5)
StopVision_SC09()
EndFunction
Function StopVision_SC09()
_00E_PlayerFunctions.GetVisionControl().VisionEffectTimestopStop(False)
_00E_PlayerFunctions.GetVisionControl().VisionEffectNoTimestopStop(MQ16_SC09_VisionNPCs)
MQ16_SC09_VisionLinkREF.Disable()
MQ16_SC09_VisionNPCLinkREF.Disable()
Sound.StopInstance(iVisionIntenseSound)
ImageSpaceModifier.RemoveCrossFade()
SetCurrentStageID(100)