Jump to content

critical hit


amusapik

Recommended Posts

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

 

What do i need to do to get this code to work?

Link to comment
Share on other sites

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

 

What do i need to do to get this code to work?

Id like for the "your function" to be an actuall damage increase modifyer based on weapon skill and luck. something liketha damage bonus when in stealth mode.any ideas?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...