enderalse/source/scripts/_00e_mq03_mercenaryfailsavesc.psc

36 lines
642 B
Plaintext

Scriptname _00E_MQ03_MercenaryFailsaveSC extends ObjectReference
Event OnDeath(Actor akKiller)
if AllMercenariesDead()
if !MQ04_SC3_DeadBodyComment.IsPlaying()
MQ04_SC3_DeadBodyComment.ForceStart()
EndIf
EndIf
EndEvent
bool Function AllMercenariesDead()
int iIndex = _00E_MQ03_Mercenaries_Property.GetSize()
while iIndex > 0
iIndex -= 1
Actor akActorToCheck = _00E_MQ03_Mercenaries_Property.GetAt(iIndex) as Actor
if !akActorToCheck.IsDead()
Return False
EndIf
endwhile
Return True
EndFunction
Scene Property MQ04_SC3_DeadBodyComment Auto
Formlist Property _00E_MQ03_Mercenaries_Property Auto