SetProjectileRefWeapon

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Sets the weapon that fired the calling live-Projectile. This will have an effect on Impact Data Set, Object Effect, Critical Effect, and possibly more - all of which will be "inherited" from the new weapon.

Syntax

[help]
(weapon:ref) reference.SetProjectileRefWeapon newWeapon:ref

Example

liveProjRef.SetProjectileRefWeapon WeapNV44Revolver 

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