1
Fork 0

Added a 3D check to FXCameraAttachScript

development
Eddoursul 3 months ago
parent b24010ff81
commit ec26c5d140
  1. BIN
      scripts/fxcameraattachscript.pex
  2. 84
      source/scripts/fxcameraattachscript.psc

Binary file not shown.

@ -21,51 +21,33 @@ int Property timeLimit = 180 Auto
;=============================================== ;===============================================
EVENT ONTRIGGERENTER(ObjectReference akActionRef) EVENT ONTRIGGERENTER(ObjectReference akActionRef)
IF (akActionRef == getPlayer() as ObjectReference);new IF (akActionRef == getPlayer() as ObjectReference);new
if(CameraAttachFX) ; Block added by USKP 1.2.6 because apparently not everything is using the default values. if(CameraAttachFX) ; Block added by USKP 1.2.6 because apparently not everything is using the default values.
CameraAttachFX.Play(akActionRef, timeLimit) CameraAttachFX.Play(akActionRef, timeLimit)
; ; debug.trace("Triggered by player") ; ; debug.trace("Triggered by player")
EndIf EndIf
if (CameraAttachFX2) if (CameraAttachFX2)
CameraAttachFX2.Play(akActionRef, timeLimit) CameraAttachFX2.Play(akActionRef, timeLimit)
endif endif
;if (CrossfadeableISM) ;if (CrossfadeableISM)
; CrossfadeableISM.ApplyCrossFade(2) ; CrossfadeableISM.ApplyCrossFade(2)
;endif ;endif
if (LoopSound) if LoopSound && Is3DLoaded()
instanceID = LoopSound.Play(Self) instanceID = LoopSound.Play(Self)
endif endif
;wait (27) ;wait (27)
endif ;new endif ;new
;goToState ("reset") ;goToState ("reset")
endEvent endEvent
EVENT OnTriggerLeave(ObjectReference akActionRef) EVENT OnTriggerLeave(ObjectReference akActionRef)
IF (akActionRef == getPlayer() as ObjectReference) IF (akActionRef == getPlayer() as ObjectReference)
if(CameraAttachFX) ; Block added by USKP 1.2.1 because apparently not everything is using the default values.
CameraAttachFX.Stop(akActionRef)
EndIf
if (CameraAttachFX2)
CameraAttachFX2.Stop(akActionRef)
endif
;if (CrossfadeableISM)
; ImageSpaceModifier.RemoveCrossFade(3)
;endif
;USKP 2.0.2 - Added check for invalid sound instance.
if (LoopSound && instanceID != 0)
StopInstance(instanceID)
endif
goToState ("waiting")
ENDIF
ENDEVENT
EVENT OnUnLoad()
if(CameraAttachFX) ; Block added by USKP 1.2.1 because apparently not everything is using the default values. if(CameraAttachFX) ; Block added by USKP 1.2.1 because apparently not everything is using the default values.
CameraAttachFX.Stop(GetPlayer()) CameraAttachFX.Stop(akActionRef)
EndIf EndIf
if (CameraAttachFX2) if (CameraAttachFX2)
CameraAttachFX2.Stop(GetPlayer()) CameraAttachFX2.Stop(akActionRef)
endif endif
;if (CrossfadeableISM) ;if (CrossfadeableISM)
; ImageSpaceModifier.RemoveCrossFade(3) ; ImageSpaceModifier.RemoveCrossFade(3)
@ -75,4 +57,22 @@ int Property timeLimit = 180 Auto
StopInstance(instanceID) StopInstance(instanceID)
endif endif
goToState ("waiting") goToState ("waiting")
ENDEVENT ENDIF
ENDEVENT
EVENT OnUnLoad()
if(CameraAttachFX) ; Block added by USKP 1.2.1 because apparently not everything is using the default values.
CameraAttachFX.Stop(GetPlayer())
EndIf
if (CameraAttachFX2)
CameraAttachFX2.Stop(GetPlayer())
endif
;if (CrossfadeableISM)
; ImageSpaceModifier.RemoveCrossFade(3)
;endif
;USKP 2.0.2 - Added check for invalid sound instance.
if (LoopSound && instanceID != 0)
StopInstance(instanceID)
endif
goToState ("waiting")
ENDEVENT

Loading…
Cancel
Save