4
Fork 0
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.
 
 
 

27 lines
837 B

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