Difference between revisions of "OnPlayerBowShot - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>JLundin
(Created page with "Category:Scripting Category:Papyrus Category:Events '''Member of:''' Actor Script ''(Requires 1.6)'' Event called when the actor is the player, and the player...")
 
imported>Chesko
(Edited the example to avoid a potential spoiler.)
Line 20: Line 20:
<source lang="papyrus">
<source lang="papyrus">
Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)
Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)
   if (Weapon  == DLC1AurielsBow && afPower < 1.0 )
   if (Weapon  == myLongBow && afPower < 1.0 )
     Debug.Trace("The player fired a dud shot!")
     Debug.Trace("The player fired a dud shot!")
   endIf
   endIf

Revision as of 12:33, 19 June 2012

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

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