<?xml version="1.0" encoding="UTF-8" ?> <class name="BTPlayAnimation" inherits="BTAction" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> <brief_description> BT action that plays an animation on the specified [AnimationPlayer] node. </brief_description> <description> BTPlayAnimation action plays an animation on the specified [AnimationPlayer] node. If the [member await_completion] is greater than [code]0[/code], the action will wait for the animation to complete, with the maximum waiting time equal to [member await_completion]. Returns [code]SUCCESS[/code] if the animation finishes playing or if the elapsed time exceeds [member await_completion]. When [member await_completion] is set to [code]0[/code], BTPlayAnimation doesn't wait for the animation to finish and immediately returns [code]SUCCESS[/code]. Returns [code]RUNNING[/code] if the animation is still playing and the elapsed time is less than [member await_completion]. Returns [code]FAILURE[/code] if the action fails to play the requested animation. </description> <tutorials> </tutorials> <members> <member name="animation_name" type="StringName" setter="set_animation_name" getter="get_animation_name" default="&"""> Animation's key within the [AnimationPlayer] node. If empty, BTPlayAnimation will resume the last played animation if the [AnimationPlayer] was previously paused. </member> <member name="animation_player" type="BBNode" setter="set_animation_player" getter="get_animation_player"> Parameter that specifies the [AnimationPlayer] node. </member> <member name="await_completion" type="float" setter="set_await_completion" getter="get_await_completion" default="0.0"> The maximum duration to wait for the animation to complete (in seconds). If the animation doesn't finish within this time, BTPlayAnimation will stop waiting and return [code]SUCCESS[/code]. </member> <member name="blend" type="float" setter="set_blend" getter="get_blend" default="-1.0"> Custom blend time (in seconds). See [method AnimationPlayer.play]. </member> <member name="from_end" type="bool" setter="set_from_end" getter="get_from_end" default="false"> Play animation from the end. Used in combination with negative [member speed] to play animation in reverse. See [method AnimationPlayer.play]. </member> <member name="speed" type="float" setter="set_speed" getter="get_speed" default="1.0"> Custom playback speed scaling ratio. See [method AnimationPlayer.play]. </member> </members> </class>