SetOnReloadWeaponEventHandler

From GECK
Jump to: navigation, search


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 any Actor reloads their Weapon.

When invoked, the script is passed with the Actor as the calling reference ("this"), and a single argument: the weapon BaseForm that was reloaded.

Syntax

[help]
SetOnReloadWeaponEventHandler handlerScript:form setORremove:1/0

Example

SetOnReloadWeaponEventHandler OnReloadWeaponUDF 1

Sets the OnReloadWeaponUDF script as a handler to be invoked when an actor reloads his weapon.

SetOnReloadWeaponEventHandler OnReloadWeaponUDF 0

Removes the OnReloadWeaponUDF script as a handler.

Handler Script

A skeleton handler script for this event:

scn	OnReloadWeaponUDF

ref	rWeapon
ref	rActor

begin Function {rWeapon}

	set rActor to this

	; (Code)

end

See Also