37 lines
812 B
Plaintext
37 lines
812 B
Plaintext
Scriptname _00E_HealthBarSummons extends Actor
|
|
{Attaches and detaches the health bar to summons}
|
|
|
|
Bool Property DiesOnBleedout = False Auto
|
|
|
|
Event OnLoad()
|
|
HealthBarManager.Show(self)
|
|
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()
|
|
HealthBarManager.Hide(self)
|
|
EndFunction
|
|
|
|
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
|
|
if aeCombatState == 1
|
|
HealthBarManager.Show(self)
|
|
endif
|
|
endEvent
|