SetOnPlayGroupEventHandler

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 playing the specified Animation Group.

When invoked, the script is passed with the Actor as the calling reference ("this"), and a single argument: the index of the played Animation Group.

Syntax

[help]
SetOnPlayGroupEventHandler handlerScript:ref setORremove:1/0 actorOrList:ref animGroup:keyWord

Example

SetOnPlayGroupEventHandler OnPlayGroupUDF 1 SomeActor AttackLoop

Sets the OnPlayGroupUDF script as a handler to be invoked when SomeActor starts playing the AttackLoop anim group.

SetOnPlayGroupEventHandler OnPlayGroupUDF 0 SomeActor AttackLoop

Removes the OnPlayGroupUDF script as a handler of the above.

Notes

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

Handler Script

A skeleton handler script for this event:

scn	OnPlayGroupUDF

int	iAnimGroup
ref	rActorRef

begin Function {iAnimGroup}

	set rActorRef to this

	(code)

end

See Also