enderalse/source/scripts/_00e_test_damagefeedbacksc.psc

30 lines
592 B
Plaintext

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