Scripts

ValbrandrDraugr

Bloodmoon.esm
Variables 6
Local Variables
DoOnce
IngmarHit
OnPCHitMe
controlvar
currenthealth
oldhealth
Source
1begin ValbrandrDraugr 2 3short DoOnce 4short IngmarHit 5short OnPCHitMe 6Short controlvar 7float currenthealth 8float oldhealth 9 10 11If ( GetJournalIndex "BM_Ingmar" <= 20 ) 12 Return 13Endif 14 15if ( DoOnce == -1 ) 16 Return 17Endif 18 19set currenthealth to GetHealth ;sets currenthealth to draugr's actual health 20 21if ( IngmarHit == 0 ) ; sets IngmarHit to check for hit by his weapon 22 set IngmarHit to HitOnMe Solvistapp 23endif 24 25if ( currenthealth < oldhealth ) ;checks if draugr got damaged last frame 26 if ( IngmarHit == 0 ) 27 Journal BM_Ingmar 40 28 Set DoOnce to -1 29 endif 30 set IngmarHit to 0 ;resets IngmarHit, so it can check again 31endif 32 33set oldhealth to GetHealth ;sets oldhealth for comparison for next frame 34 35if ( OnDeath == 1 ) 36 Journal BM_Ingmar 50 37endif 38 39 40end