enderalse/scripts/source/_00e_healthbarsummons.psc

38 lines
992 B
Plaintext
Raw Normal View History

Scriptname _00E_HealthBarSummons extends Actor
{Attaches and detaches the health bar to summons}
_00E_FS_ForgottenStories_Functions Property ForgottenStoriesMiscDialogue Auto
Bool Property DiesOnBleedout = False Auto
Bool bRegisteredHealthBars = True ; Default to True, not False, for version update
Event OnLoad()
ForgottenStoriesMiscDialogue.showActorHealthBars(self)
bRegisteredHealthBars = True
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()
If bRegisteredHealthBars
bRegisteredHealthBars = False
ForgottenStoriesMiscDialogue.hideActorHealthBars(self)
EndIf
EndFunction