GetProjectileRefWeapon

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns the weapon (Base Form) that fired the calling live-Projectile.

Syntax

[help]
(weapon:baseForm) reference.GetProjectileRefWeapon

Example

set rSourceWeapon to liveProjRef.GetProjectileRefWeapon 

Finding Live-Projectile References

One way to get a live-projectile reference is by "ref-walking" - that is, walking through projectile references using the GetFirstRef and GetNextRef functions.

Example:

set rProj to GetFirstRef 51 3
while rProj
	; Do something
	set rProj to GetNextRef
loop

Another is to retrieve the live-projectile reference provided by SetOnProjectileImpactEventHandler, which is on the brink of expiring.

See Also