enderalse/scripts/source/_00e_mq12b_sc12_killtriggersc.psc

38 lines
1.5 KiB
Plaintext

Scriptname _00E_MQ12b_SC12_KillTriggerSC extends ObjectReference
; This script is placed on a triggerbox
; (_00E_MQ12b_SC12_KillTriggerTGBX) near Ark's harbor-facing gate.
; It is meant to kill any stray Nehrimese soldiers that happen to make
; it through the gate, in order to prevent the "endless battle" bug
; ( http://forum.sureai.net/viewtopic.php?f=201&t=9531 ).
Event OnTriggerEnter(ObjectReference akActionRef)
int stage = MQ12b.GetStage()
if stage >= 100 && stage <= 125
Actor ac = akActionRef as Actor
if ac == None
return
endif
ActorBase ab = ac.GetActorBase()
if ab.IsGhost()
if (ab == _00E_MQ12b_NehrimeseSoldierFacade) || (ab == _00E_MQ12b_NehrimeseSoldierFacadeArcher) || (ab == _00E_MQ12b_NehrimeseSoldier01) || (ab == _00E_MQ12b_NehrimeseSoldier02) || (ab == _00E_MQ12b_NehrimeseSoldier03) || (ab == _00E_MQ12b_NehrimeseSoldier04) || (ab == _00E_MQ12b_NehrimeseSoldier05)
ac.KillEssential()
endif
endif
endif
EndEvent
bool Done
_00E_MQ12b_Functions Property MQ12b Auto
ActorBase Property _00E_MQ12b_NehrimeseSoldierFacade Auto
ActorBase Property _00E_MQ12b_NehrimeseSoldierFacadeArcher Auto
ActorBase Property _00E_MQ12b_NehrimeseSoldier01 Auto
ActorBase Property _00E_MQ12b_NehrimeseSoldier02 Auto
ActorBase Property _00E_MQ12b_NehrimeseSoldier03 Auto
ActorBase Property _00E_MQ12b_NehrimeseSoldier04 Auto
ActorBase Property _00E_MQ12b_NehrimeseSoldier05 Auto