CrossFadeAnims
A function added by the kNVSE Plugin.
Description
Triggers a cross-fade transition between two specified animation sequences over a specified duration. The source sequence must be an actively playing anim sequence. Returns 1 if it succeeds or 0 if it fails. This is a low level animation function that should be used with care.
- iPriority specifies the new priority for both sequences.
- fWeight specifies the weight of the destination sequence at the end of the transition (ramping up from 0.0 at its start).
- If a time sync sequence is specified, the destination sequence is synchronized with it.
The source anim must be active and destination anim deactivated or otherwise nothing will happen.
Syntax
actor.CrossFadeAnims source sequence path:string dest sequence path:string bFirstPerson:0/1 fEaseInTime:float iPriority:integer bStartOver:0/1 fWeight:float time sync sequence path:string
Example
CrossFadeAnims "Characters\Falling.kf" "Characters\Landing.kf" 0
Cross Fade Transitions
A cross fade transition eases out a source sequence while easing in a destination sequence over a specified duration. No time synchronization is performed between the two sequences, so if they are different lengths or have different frequencies, visual artifacts may occur. CrossFadeAnims is simply a convenience function that calls DeactivateAnim on the source sequence and ActivateAnim on the destination sequence, specifying the duration for the fade out and fade in times. Cross fade transitions are good for smoothly transitioning between two sequences that have similar styles of movement and for transitions in which the flow of movement needs to be continuous where the sequences need not be synchronized.