enderalse/source/scripts/tripwire.psc

67 lines
1.2 KiB
Plaintext
Raw Normal View History

scriptName Tripwire extends TrapTriggerBase
State Active
2023-12-06 15:31:10 +00:00
Event OnBeginState()
2023-12-06 15:31:10 +00:00
SetMotionType (1)
TriggerSound.play (Self as ObjectReference)
Self.blockActivation (False)
Activate (Self as ObjectReference)
Self.blockActivation (True)
PlayAnimation ("Trigger")
GoToState ("DoNothing")
EndEvent
2023-12-06 15:31:10 +00:00
Event OnHit (ObjectReference akAggressor, Form akSource, Projectile akProjectile, Bool abPowerAttack, Bool abSneakAttack, Bool abBashAttack, Bool abHitBlocked)
EndEvent
2023-12-06 15:31:10 +00:00
EndState
State DoNothing
Event OnBeginState()
SetDestroyed (True)
EndEvent
Event OnLoad()
EndEvent
EndState
2023-12-06 15:31:10 +00:00
Event OnLoad()
SetMotionType(4)
2023-12-06 15:31:10 +00:00
EndEvent
;/
Event OnCellDetach()
2023-12-06 15:31:10 +00:00
SetMotionType(1)
2023-12-06 15:31:10 +00:00
EndEvent
/;
2023-12-06 15:31:10 +00:00
Function LocalActivateFunction()
2023-12-06 15:31:10 +00:00
GoToState ("Active")
EndFunction
Event OnReset()
Self.Reset()
;SetMotionType (4) - USKP 2.0.1: Can't do this here, needs to rely on the OnLoad event above.
Self.ClearDestruction()
Self.SetDestroyed (False)
GoToState ("Inactive")
CountUsed = 0
2023-12-06 15:31:10 +00:00
EndEvent
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
2023-12-06 15:31:10 +00:00
GoToState ("Active")
EndEvent