I'm trying to make a spell that binds arrows to the caster, and when you shoot the arrows they require magicka like a spell. This is my first mod and I am not sure if this is on the code side or not.
In my papyrus log I get this error: "Unable to bind script tx_magickaarrow to Active effect 15 on (00000014) because their base types do not match"
Here's my code:
Scriptname tx_magickaarrow extends ActiveMagicEffect
Actor Property PlayerRef Auto
Ammo Property MagickaArrow Auto
MagicEffect Property magickaArrowfx Auto
Event OnInit()
RegisterForAnimationEvent(PlayerRef, "bowDrawStart")
EndEvent
Event OnAnimationEvent(ObjectReference akSource, string asEventName)
If (akSource == PlayerRef) && (asEventName == "bowDrawStart") && (PlayerRef.GetAV("Magicka") < 110) && (PlayerRef.HasMagicEffect(magickaArrowfx))
Debug.Trace("bowDrawStart Animation hook")
Debug.SendAnimationEvent(PlayerRef, "attackStop")
EndIf
EndEvent
Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)
If (PlayerRef.HasMagicEffect(magickaArrowfx))
Debug.Trace("Arrow shot Hook"
PlayerRef.additem(MagickaArrow,1,TRUE)
PlayerRef.DamageAV("Magicka", 6)
EndIf
EndEvent