Background for Skyrim SE
Member of the Actor script
eventOnPlayerBowShot(WeaponakWeapon, AmmoakAmmo, floatafPower, boolabSunGazing)

Description

Wiki Description

Event called when the actor is the player, and the player has fired a bow. If this event is handled in a script that's not on the player, the event will never be hit.

Documentation Comment

Received when the player fires a bow. akWeapon will be a bow, akAmmo is the ammo or None,
afPower will be 1.0 for a full-power shot, less for a dud, and abSunGazing will be true if the player is looking at the sun.


Parameters

  1. WeaponakWeapon

    CK Wiki Description

    The Weapon that was fired. This will always be a bow.

  2. AmmoakAmmo

    CK Wiki Description

    The Ammo fired by the bow. This could be None.

  3. floatafPower

    CK Wiki Description

    The power of the shot. < 1.0 is a dud, 1.0 is full-power. The minimum power is specified in the GameSetting fArrowMinPower.

  4. boolabSunGazing

    CK Wiki Description

    True if the player is looking at the sun when the shot is fired, false if not.


Examples

Weapon property myLongBow auto

Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)
  if (akWeapon == myLongBow && afPower < 1.0 )
    Debug.Trace("The player fired a dud shot!")
  endIf
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends Actor

event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)
    Debug.trace("Event received - OnPlayerBowShot: akWeapon = " + akWeapon + " akAmmo = " + akAmmo + " afPower = " + afPower + " abSunGazing = " + abSunGazing)
endEvent

Related Pages


Additional References

View this event’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.