SetOnAnimActionEventHandler

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 the specified Actor starts performing the specified Animation Action (see GetAnimAction).

When invoked, the script is passed with the Actor as the calling reference ("this"), and a single argument: the performed Animation Action (0-13).

Syntax

[help]
SetOnAnimActionEventHandler handlerScript:ref setORremove:1/0 actorOrList:ref animAction:int{0-13}

Example

SetOnAnimActionEventHandler OnAnimActionUDF 1 SomeActor 2

Sets the OnAnimActionUDF script as a handler to be invoked when SomeActor starts performing the Attack action.

SetOnAnimActionEventHandler OnAnimActionUDF 0 SomeActor 2

Removes the OnAnimActionUDF script as a handler of the above.

Notes

  • As the 3rd argument, either a single reference, or a Form List of references may be passed.
  • If the 3rd argument is an empty Form List, the handler will be invoked for ANY actor performing the specified Animation Action.

Handler Script

A skeleton handler script for this event:

scn	OnAnimActionUDF

int	iAnimAction
ref	rActorRef

begin Function {iAnimAction}

	set rActorRef to this

	(code)

end

See Also