Jump to content

Need help


Magnusen2

Recommended Posts

 

 

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

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 by Magnusen2
Link to comment
Share on other sites

  • Recently Browsing   0 members

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