PlayAnimSequence

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Plays the specified animation sequence on the calling reference. The sequence must be defined in a NiControllerManager, in the calling reference's loaded 3D model.

The 2nd argument, nodeName, is optional, and may be used for directing the function to a specific node in the 3D model, where the NiControllerManager is found. If omitted, the function will look for it in the root node.

When called on an actor, this function can play any variant of any Animation Group that is available for that actor. This is done by passing the path to the .kf animation file (relative to the meshes\ folder) as the sequence name.

This function differs from PlayGroup in that:

  • It enables to play any defined animation sequence, and is not restricted to sequences matching one of the Animation Group.
  • It enabled to specify a node other than the root node.

Syntax

[help]
(successful:0/1) reference.PlayAnimSequence sequenceName:string nodeName:string

Example

objectRef.PlayAnimSequence "YugeKaboom"
objectRef.PlayAnimSequence "YugeKaboom" "Blast_Node"
actorRef.PlayAnimSequence "Characters\_Male\2hrjamk.kf"
objectRef.PlayAnimSequence "Open"
objectRef.PlayAnimSequence "Close"