critical hit help

Post » Thu May 03, 2012 1:44 pm

how can i get this script to run? a step by step would be nice i have been trying to get it to work but i guess i just dont understand

Scn CriticalHit
Short RandomPercent
Short SkillVar
Ref Me
Float LuckSkill
Float BladeSkill
Begin ScriptEffectStart
If isEssential == 0
Set RandomPercent to getRandomPercent
Set LuckSkill to player.getActorValue Luck
Set BladeSkill to player.getActorValue Blade
Set SkillVar to (LuckSkill + BladeSkill) * 0.025
If SkillVar < 1
Set SkillVar to 1
Endif
If RandomPercent <= SkillVar
Message "Critical Hit"
;Set Me to getself
;your functions (eg. Player.Pushactoraway Me 100)
Endif
Endif
End

not sure how to empliment it. do i need to reference it to some other thing? a onhit? and how?
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm

Return to IV - Oblivion