2023-12-04 15:02:58 +00:00
|
|
|
scriptName Tripwire extends TrapTriggerBase
|
|
|
|
|
|
|
|
|
|
|
|
State Active
|
2023-12-06 15:31:10 +00:00
|
|
|
|
2023-12-04 15:02:58 +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-04 15:02:58 +00:00
|
|
|
|
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-04 15:02:58 +00:00
|
|
|
|
2023-12-06 15:31:10 +00:00
|
|
|
EndState
|
|
|
|
|
|
|
|
State DoNothing
|
|
|
|
|
|
|
|
Event OnBeginState()
|
|
|
|
SetDestroyed (True)
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnLoad()
|
|
|
|
EndEvent
|
2023-12-04 15:02:58 +00:00
|
|
|
|
|
|
|
EndState
|
|
|
|
|
2023-12-06 15:31:10 +00:00
|
|
|
Event OnLoad()
|
|
|
|
|
2023-12-04 15:02:58 +00:00
|
|
|
SetMotionType(4)
|
2023-12-06 15:31:10 +00:00
|
|
|
|
2023-12-04 15:02:58 +00:00
|
|
|
EndEvent
|
|
|
|
|
|
|
|
;/
|
|
|
|
Event OnCellDetach()
|
2023-12-06 15:31:10 +00:00
|
|
|
|
2023-12-04 15:02:58 +00:00
|
|
|
SetMotionType(1)
|
2023-12-06 15:31:10 +00:00
|
|
|
|
2023-12-04 15:02:58 +00:00
|
|
|
EndEvent
|
|
|
|
/;
|
|
|
|
|
2023-12-06 15:31:10 +00:00
|
|
|
Function LocalActivateFunction()
|
2023-12-04 15:02:58 +00:00
|
|
|
|
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")
|
2023-12-04 15:02:58 +00:00
|
|
|
CountUsed = 0
|
2023-12-06 15:31:10 +00:00
|
|
|
|
|
|
|
EndEvent
|
2023-12-04 15:02:58 +00:00
|
|
|
|
|
|
|
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
|
2023-12-04 15:02:58 +00:00
|
|
|
|