SetOnFireWeaponEventHandler

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the JIP NVSE Plugin.

Description

Sets/removes the specified UDF Script as a handler that will be invoked in the event the specified Actor fires a round with a ranged-weapon.

When invoked, the script is passed with the Actor as the calling reference ("this"), and a single argument: the Weapon (base form) that was fired.

Syntax

[help]
SetOnFireWeaponEventHandler handlerScript:ref setORremove:1/0 actorOrList:ref

Example

SetOnFireWeaponEventHandler OnFireWeaponUDF 1 SomeActor

Sets the OnFireWeaponUDF script as a handler to be invoked when SomeActor fires a weapon.

SetOnFireWeaponEventHandler OnFireWeaponUDF 0 SomeActor

Removes the OnFireWeaponUDF script as a handler of the above.

Notes

  • As the third argument, either a single reference, or a FormList of references may be passed.

Handler Script

A skeleton handler script for this event:

scn	OnFireWeaponUDF

ref	rWeapon
ref	rActorRef

begin Function {rWeapon}

	set rActorRef to this

	(code)

end

See Also