I wanted to create a quick script associated to an enchantment I created. The goal here is to have the script check if the equipped weapon is a bow on weapon draw and to then check if the associated enchantment is present on the weapon. If so, it should add and equip Bound Arrows to the actor/player. I'm an amateur when it comes to scripting and papyrus, so any help is greatly appreciated:
Scriptname ApolloArrowEffectScript extends ActiveMagicEffect Ammo Property boundArrow AutoMagicEffect Property BoundArrowFFSelf Auto EVENT OnWeaponDraw(Actor Target, Actor Caster)if (Game.GetActor().GetEquippedWeapon().IsBow() if(Game.GetActor().WeaponProperty.GetEnchantment().IsEnchApolloArrow() caster.additem(boundArrow,100,TRUE) caster.equipitem(boundArrow,TRUE,TRUE) endEvent else endEVENTelseendEVENT EVENT OnWeaponSheathe(Actor Target, Actor Caster)caster.removeitem(boundArrow,caster.getItemCount(boundArrow),TRUE)endEVENT
I'm pulling those event functions out of my ass as I didn't know the correct method of calling for them. Am I handling this correctly or am I butchering it? I spliced this together by looking at a couple other mods and the skse creation kit wiki page, so I apologize if there are any obvious errors.