enderalse/scripts/source/_00e_enemygroupparentscript.psc

27 lines
837 B
Plaintext
Raw Normal View History

Scriptname _00E_EnemyGroupParentScript extends Actor
Keyword Property EnemyGroup_Child01 Auto
Keyword Property EnemyGroup_Child02 Auto
Keyword Property EnemyGroup_Child03 Auto
Keyword Property EnemyGroup_Child04 Auto
Keyword Property EnemyGroup_Child05 Auto
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
If aeCombatState == 1
_CallForChildHelp(EnemyGroup_Child01)
_CallForChildHelp(EnemyGroup_Child02)
_CallForChildHelp(EnemyGroup_Child03)
_CallForChildHelp(EnemyGroup_Child04)
_CallForChildHelp(EnemyGroup_Child05)
EndIf
EndEvent
Function _CallForChildHelp(Keyword childKeyword)
If childKeyword
Actor myChild = GetLinkedRef(childKeyword) as Actor
If myChild && myChild.IsInCombat() == False
; Debug.Trace(self + ": calling child " + myChild)
myChild.EvaluatePackage()
EndIf
EndIf
EndFunction