ShowOff:OnProjectileImpact

From GECK
Jump to: navigation, search

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

Description

This event runs whenever a projectile has impacted with an object (including terrain).

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 projectile reference that has impacted.

The args dispatched to handlers are:

  1. The projectile's source Actor reference.
  2. The projectile's source Weapon BaseForm.
  3. The impacted reference (equivalent to calling GetProjectileRefImpactRef). Can be an invalid form.

Syntax

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

Handler Script

A skeleton handler script for this event:

scn OnProjectileImpactUDF

begin Function { ref rProjOwner, ref rWeapon, ref rImpactedRef }
   ref rProjRef = GetSelfAlt  ;* GetSelf would do the same thing
   ; do code
end

Example

SetEventHandlerAlt "ShowOff:OnProjectileImpact" OnProjectileImpactUDF 1::SunnyREF 3::Player

Will register OnProjectileImpactUDF as an event handler for the event, and it should only be called if the projectile's owner is SunnyREF and the Player is the impacted reference.

See Also