OnPlayerBowShot - Actor

From the CreationKit Wiki
Revision as of 17:07, 19 June 2012 by imported>Fg109 (→‎Examples: edited syntax, although I don't know why you need to check for the bow)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 (akWeapon == myLongBow && afPower < 1.0 )
    Debug.Trace("The player fired a dud shot!")
  endIf
endEvent

See Also