Difference between revisions of "OnPlayerBowShot - Actor"
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>Fg109 m (→Examples: edited syntax, although I don't know why you need to check for the bow) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 19: | Line 19: | ||
== Examples == | == Examples == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Weapon property myLongBow auto | |||
Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing) | Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing) | ||
if ( | if (akWeapon == myLongBow && afPower < 1.0 ) | ||
Debug.Trace("The player fired a dud shot!") | Debug.Trace("The player fired a dud shot!") | ||
endIf | endIf |
Latest revision as of 17:07, 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[edit | edit source]
Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)
Parameters[edit | edit source]
- 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[edit | edit source]
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