Jump to content

Recommended Posts

Hello fellow moders, I'm trying to add bloodskal-like effect on a greatsword I use . However my skills at modding is limited so i keep searching for tips and tutorials for it.

 

It seems it needs some scripts to bind magic effect/spell to greatsword's heavy attacks. Does anyone can help me to create that script and organize the steps i should take?

 

ps: I know Imbued Weapons Mod exists and I can use it but, i just want to make it unique only to that custom sword.

 

Edit: I used two scripts . Excuse my poor scripts

 

This one for binding it to mysword

Scriptname MySwordScript extends ObjectReference  

Spell Property EnergyWaveSpell auto

Event OnEquipped(Actor akActor)
    akActor.AddSpell(EnergyWaveSpell)
EndEvent

Event OnUnEquipped(Actor akActor)
    akActor.RemoveSpell(EnergyWaveSpell)
EndEvent

This one for casting on animation

Scriptname EnergyWaveScript  extends activemagiceffect  

Spell Property EnergyWaveSpellHoriz auto
Spell Property EnergyWaveSpellVert auto

Actor SelfRef

Event OnEffectStart(Actor akTarget, Actor akCaster)
        SelfRef = akCaster
        registerForAnimationEvent(SelfRef, "AttackPowerStanding_FXstart")
        registerForAnimationEvent(SelfRef, "AttackPowerRight_FXstart")
        registerForAnimationEvent(SelfRef, "AttackPowerLeft_FXstart")
        registerForAnimationEvent(SelfRef, "AttackPowerBackward_FXstart")
        registerForAnimationEvent(SelfRef, "AttackPowerForward_FXstart")
endEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)

ENDEVENT

Event OnAnimationEvent(ObjectReference akSource, string EventName)
        if (eventName == "AttackPowerRight_FXstart") || (eventName == "AttackPowerLeft_FXstart") || (eventName == "AttackPowerBackward_FXstart")
            EnergyWaveSpellHoriz.cast(SelfRef)

        elseif  (eventName == "AttackPowerStanding_FXstart") || (eventName == "AttackPowerForward_FXstart")
            EnergyWaveSpellVert.cast(SelfRef)
        endif
endEVENT
Edited by uffnenicki
Link to comment
Share on other sites

  • Recently Browsing   0 members

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