Open Asterune
AnimationGraphPlayer

AnimationGraphPlayer

Plays an animation graph and exposes its parameters, layers, and events.

Behavior

AnimationGraphPlayer plays an animation graph and exposes its parameters, layers, and events.

Summary

Members29
Properties9
Methods17
  • AdjustSpeed(speed: number): ()

    Changes the playback speed multiplier.

  • AdjustWeight(weight: number, fadeTime: number?): ()

    Changes the target blend weight over the supplied fade duration, in seconds.

  • CrossFade(state: string, fadeTime: number?, layer: string?): ()

    Changes to the target state with the supplied fade duration, in seconds.

  • Stops playback and releases this playback object.

  • Fire(name: string): ()

    Sets the named trigger parameter.

  • Get(name: string): number | boolean

    Returns the current value of a numeric or boolean graph parameter.

  • Returns the control interface for the named graph layer.

  • Returns the graph's layer control interfaces.

  • GetMarkerReachedSignal(name: string): AstScriptSignal<string, string>

    Returns the signal for the named animation marker.

  • GetParameters(): { [string]: number | boolean }

    Returns the current numeric and boolean graph parameters.

  • GetState(layer: string?): string?

    Returns the active state of the selected layer.

  • IsA(className: string): boolean

    Returns whether the value matches the supplied type name.

  • Play(fadeTime: number?): ()

    Starts playback with optional fade, weight, or speed parameters.

  • ResetTrigger(name: string): ()

    Clears the named trigger parameter.

  • Set(name: string, value: number | boolean): ()

    Sets a numeric or boolean graph parameter.

  • Stop(fadeTime: number?): ()

    Stops playback with an optional fade duration, in seconds.

  • Travel(state: string, layer: string?): ()

    Requests a transition path to the target state through the graph's transitions.

Events3

Properties

ClassName

AnimationGraphPlayer.ClassName: string

The runtime type name.

Graph

AnimationGraphPlayer.Graph: AnimationGraph

The AnimationGraph used by this player.

IsPlaying

AnimationGraphPlayer.IsPlaying: boolean

Whether playback is currently active.

Name

AnimationGraphPlayer.Name: string

The runtime value name.

Priority

AnimationGraphPlayer.Priority: EnumItem

The animation priority used to resolve competing joint poses.

RootMotion

AnimationGraphPlayer.RootMotion: CFrame

The root-motion transform produced by graph playback.

Speed

AnimationGraphPlayer.Speed: number

The playback speed multiplier.

State

AnimationGraphPlayer.State: string?

The active state name, or nil when no state is active.

Weight

AnimationGraphPlayer.Weight: number

The current blend weight.

Methods

AdjustSpeed

AnimationGraphPlayer:AdjustSpeed(speed: number): ()

Changes the playback speed multiplier.

AdjustWeight

AnimationGraphPlayer:AdjustWeight(weight: number, fadeTime: number?): ()

Changes the target blend weight over the supplied fade duration, in seconds.

CrossFade

AnimationGraphPlayer:CrossFade(state: string, fadeTime: number?, layer: string?): ()

Changes to the target state with the supplied fade duration, in seconds.

Destroy

AnimationGraphPlayer:Destroy(): ()

Stops playback and releases this playback object.

Fire

AnimationGraphPlayer:Fire(name: string): ()

Sets the named trigger parameter.

Get

AnimationGraphPlayer:Get(name: string): number | boolean

Returns the current value of a numeric or boolean graph parameter.

GetLayer

AnimationGraphPlayer:GetLayer(name: string): AnimationGraphLayer

Returns the control interface for the named graph layer.

GetLayers

AnimationGraphPlayer:GetLayers(): { AnimationGraphLayer }

Returns the graph's layer control interfaces.

GetMarkerReachedSignal

AnimationGraphPlayer:GetMarkerReachedSignal(name: string): AstScriptSignal<string, string>

Returns the signal for the named animation marker.

GetParameters

AnimationGraphPlayer:GetParameters(): { [string]: number | boolean }

Returns the current numeric and boolean graph parameters.

GetState

AnimationGraphPlayer:GetState(layer: string?): string?

Returns the active state of the selected layer.

IsA

AnimationGraphPlayer:IsA(className: string): boolean

Returns whether the value matches the supplied type name.

Play

AnimationGraphPlayer:Play(fadeTime: number?): ()

Starts playback with optional fade, weight, or speed parameters.

ResetTrigger

AnimationGraphPlayer:ResetTrigger(name: string): ()

Clears the named trigger parameter.

Set

AnimationGraphPlayer:Set(name: string, value: number | boolean): ()

Sets a numeric or boolean graph parameter.

Stop

AnimationGraphPlayer:Stop(fadeTime: number?): ()

Stops playback with an optional fade duration, in seconds.

Travel

AnimationGraphPlayer:Travel(state: string, layer: string?): ()

Requests a transition path to the target state through the graph's transitions.

Events

MarkerReached

AnimationGraphPlayer.MarkerReached: RBXScriptSignal

Fires when playback reaches an animation marker.

StateChanged

AnimationGraphPlayer.StateChanged: RBXScriptSignal

Fires when the active graph state changes.

Stopped

AnimationGraphPlayer.Stopped: RBXScriptSignal

Fires when playback stops.

Operators

__type

Used by

AnimationController · Animator · Humanoid