ShowOff:OnFireWeapon

From GECK
Jump to: navigation, search

An event handler added by the ShowOff NVSE Plugin version 1.65.

Description

This event runs whenever a ranged Weapon is being fired by an Actor.

  • It runs before ModifyChanceForAmmoItem perk entry point can add items.
  • It runs before the weapon is damaged from firing.
  • It runs before JIP's OnFireWeapon event. Unlike it, this event works in Godmode.
  • It runs right before the spread for the shot is calculated.

The event is flushed every time the game is loaded. Use a GetGameLoaded check or other method to re-register a handler.

Dispatched Args

GetSelf / GetSelfAlt will return the Actor reference that fired the weapon.

The arg dispatched to handlers is:

  1. The Weapon BaseForm being fired.

Syntax

Use SetEventHandler / SetEventHandlerAlt with the event name "ShowOff:OnFireWeapon".

Handler Script

A skeleton handler script for this event:

begin Function { ref rWeapon }

    ref rActor := ThisAlt

    printvar rActor
    printvar rWeapon
    print "TestShowOffOnFireWeapon >> RAN!"

end

Example

SetEventHandlerAlt "ShowOff:OnFireWeapon" TestShowOffOnFireWeapon
SetEventHandlerAlt "ShowOff:OnFireWeapon" TestShowOffOnFireWeapon 0::Player

See Also