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
WeaponakWeapon
CK Wiki Description
The Weapon that was fired. This will always be a bow.
AmmoakAmmo
CK Wiki Description
The Ammo fired by the bow. This could be None.
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.
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
endEventAuto-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