OnPlayerBowShot - Actor

From the CreationKit Wiki
Revision as of 12:35, 19 June 2012 by imported>Chesko (→‎Examples)
Jump to navigation Jump to search

Member of: Actor Script (Requires 1.6)

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.

Syntax

Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)

Parameters

  • akWeapon: The Weapon that was fired. This will always be a bow.
  • akAmmo: The Ammo fired by the bow. This could be None.
  • afPower: The power of the shot. < 1.0 is a dud, 1.0 is full-power. The minimum power is specified in the GameSetting fArrowMinPower.
  • abSunGazing: 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 (Weapon  == myLongBow && afPower < 1.0 )
    Debug.Trace("The player fired a dud shot!")
  endIf
endEvent

See Also