Magnusen2 Posted September 24, 2016 Share Posted September 24, 2016 State BoltsEquipped Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing) If PlayerRef.GetAv("Magicka") > 20 PlayerRef.DamageAv("Magicka", 20) If PlayerRef.GetItemCount(CurrentBolt) < MaxAmmo SetAmmo() PlayerRef.AddItem(CurrentBolt, MaxAmmo - PlayerRef.GetItemCount(CurrentBolt), true) EndIf Elseif PlayerRef.GetAv("Magicka") < 20 Debug.notification("You don't have enough magicka to create another ethereal bolt") Else PlayerRef.DamageAv("Magicka", PlayerRef.GetAv("Magicka")) EndIf EndEvent OnPlayerBowShot doesn't seem to work with crossbows. Any way for me to trigger the code above when firing a crossbow? Link to comment Share on other sites More sharing options...
lofgren Posted September 24, 2016 Share Posted September 24, 2016 Is there an animation event you can register for? Link to comment Share on other sites More sharing options...
Magnusen2 Posted September 25, 2016 Author Share Posted September 25, 2016 (edited) Is there an animation event you can register for?Thank you. I added: RegisterForAnimationEvent(PlayerRef,"BowRelease") and substituted the OnPlayerBowShot of my first post with a OnAnimationEvent and now it works. Edited September 25, 2016 by Magnusen2 Link to comment Share on other sites More sharing options...
Recommended Posts