2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_HealthBarSummons extends Actor
|
|
|
|
{Attaches and detaches the health bar to summons}
|
|
|
|
|
|
|
|
Bool Property DiesOnBleedout = False Auto
|
|
|
|
|
|
|
|
Event OnLoad()
|
2022-08-01 01:33:22 +00:00
|
|
|
HealthBarManager.Show(self)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnEnterBleedout()
|
|
|
|
If DiesOnBleedout
|
|
|
|
UnregisterHealthBars()
|
|
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnDying(Actor akKiller)
|
|
|
|
UnregisterHealthBars()
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnDeath(Actor akKiller)
|
|
|
|
UnregisterHealthBars() ; In case OnDying fails to unregister the health bars
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnUnload()
|
|
|
|
UnregisterHealthBars() ; In case OnDying and OnDeath fail to unregister the health bars (see the essential oorbayas)
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Function UnregisterHealthBars()
|
2022-08-01 01:33:22 +00:00
|
|
|
HealthBarManager.Hide(self)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndFunction
|
2021-10-05 22:22:24 +00:00
|
|
|
|
|
|
|
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
|
|
|
|
if aeCombatState == 1
|
2022-08-01 01:33:22 +00:00
|
|
|
HealthBarManager.Show(self)
|
2021-10-05 22:22:24 +00:00
|
|
|
endif
|
|
|
|
endEvent
|