I Can't Get My Effect Script to Bind to the Spell.

Post » Thu Jan 19, 2017 10:24 pm

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
User avatar
LADONA
 
Posts: 3290
Joined: Wed Aug 15, 2007 3:52 am

Return to V - Skyrim