SetActorAnimationPath

From GECK
Jump to: navigation, search


A function added by the kNVSE Plugin.

Description

Replaces an animation for a specified actor reference. The anim group that is overridden is specified in the KF file of the given path. Path may also be a folder containing KF files.

Syntax

[help]
(success:0/1) actor.SetActorAnimationPath firstPerson:0/1 enable:0/1 path:string
  pollConditionFunction:0/1
  conditionFunction:UDF/function

Example

player.SetActorAnimationPath 0 1 "characters\_male\TestAnims\sneakmtforward.kf"

SetActorAnimationPath 0 1 "walkAnimation.kf" 0 ({} => this != Player) ; makes everyone except player use walk animation

player.SetActorAnimationPath 0 1 "sprint.kf" 1 ({} => IsKeyPressed 42 && player.GetAV ActionPoints != 0) 
; player uses sprint animation when shift is held. pollConditionFunction arg is 1 so animation will start/stop midst animation if condition becomes false at any point. 

Notes

  • This function stacks so if two mod override the same anim group on the same actor, the previous override will be restored once the other mod disables it's animation override.

See Also