Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
731 B
32 lines
731 B
Scriptname _00E_MQ11a_SC20_ZombieTriggerScript extends ObjectReference
|
|
|
|
Actor Property PlayerRef Auto
|
|
_00E_MQ11a_Functions Property MQ11a Auto
|
|
Bool bDone = False
|
|
|
|
Event OnTriggerEnter(ObjectReference triggerRef)
|
|
If triggerRef == PlayerRef
|
|
TryActivateFight()
|
|
EndIf
|
|
EndEvent
|
|
|
|
Event OnActivate(ObjectReference triggerRef)
|
|
If (bDone == False) && (triggerRef as Actor) ; Probably activated by one of the zombies on entering combat
|
|
TryActivateFight()
|
|
EndIf
|
|
EndEvent
|
|
|
|
Function TryActivateFight()
|
|
Int mq11aStage = MQ11a.GetStage()
|
|
If mq11aStage == 125
|
|
If (bDone == False)
|
|
bDone = True
|
|
MQ11a.PreparePortcullisFight()
|
|
Self.Disable()
|
|
EndIf
|
|
ElseIf mq11aStage > 125
|
|
bDone = True
|
|
Self.Disable()
|
|
EndIf
|
|
EndFunction
|
|
|
|
|