Jump to content

How to create "stackable" damage spell?


Sirxon

Recommended Posts

Well basically i want to make the enchantment, but in short way when you hit your target with the weapon the spell kicks in.

Anyway the bonus damage of 30 is always the same each time you hit the target but wears out if you dont hit the target in the 5 seconds or target is dead.

Here is more better description:

 

When you hit an enemy you "dig" deeper in the wounds causing consecutive attacks to the same enemy to deal more damage. Each hit on the same target within 6 seconds, including the first hit, deals damage and increases the damage taken by subsequent attacks. If the same target is not attacked after 6 seconds, the bonus damage is lost.

Link to comment
Share on other sites

Well basically i want to make the enchantment, but in short way when you hit your target with the weapon the spell kicks in.

Anyway the bonus damage of 30 is always the same each time you hit the target but wears out if you dont hit the target in the 5 seconds or target is dead.

Here is more better description:

 

When you hit an enemy you "dig" deeper in the wounds causing consecutive attacks to the same enemy to deal more damage. Each hit on the same target within 6 seconds, including the first hit, deals damage and increases the damage taken by subsequent attacks. If the same target is not attacked after 6 seconds, the bonus damage is lost.

 

Cant say for sure if this works, but try this:

 

scriptname stackDamage extends activemagiceffect

Actor Property Target auto hidden
Int Property Damage = 30 auto
Int Property Stacks = 1 auto  hidden
Keyword Property StackingSpellKW auto

event OnEffectStart(actor akTarget, Actor akCaster)
    Target = akTarget
endEvent

event OnEffectFinish(actor akTarget, Actor akCaster)
    stacks = 1
endEvent

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
 bool abBashAttack, bool abHitBlocked)
    if((akSource as Spell).hasKeyword(StackingSpellKW)
         Target.damageav("health", Damage*Stacks)
         Stacks+=1
    endif
endEvent

 

Attach this script to your enchantment magic effect, along with a custom keyword.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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