Enderal SE https://mod.pub/enderal-se/38-enderal-se
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.
30 lines
592 B
30 lines
592 B
Scriptname _00E_Test_DamageFeedbackSC extends Actor
|
|
|
|
Event OnInit()
|
|
|
|
if DebugMode.GetValueInt() == 1
|
|
|
|
RegisterForSingleUpdate(0.25)
|
|
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
Event OnUpdate()
|
|
|
|
fHealth = Self.GetAV("Health")
|
|
|
|
EndEvent
|
|
|
|
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
|
|
|
|
|
Float Damage = fHealth - Self.GetActorValue("Health")
|
|
fHealth = Self.GetActorValue("Health")
|
|
Debug.MessageBox("Damage was " + Damage as Float)
|
|
|
|
EndEvent
|
|
|
|
float fHealth
|
|
|
|
GlobalVariable Property DebugMode Auto |