limboai/doc_classes/BTPlayAnimation.xml

35 lines
2.6 KiB
XML
Raw Permalink Normal View History

2023-08-13 17:38:14 +00:00
<?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">
2023-08-13 17:38:14 +00:00
<brief_description>
2023-08-14 12:42:46 +00:00
BT action that plays an animation on the specified [AnimationPlayer] node.
2023-08-13 17:38:14 +00:00
</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].
2023-08-13 17:38:14 +00:00
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="&amp;&quot;&quot;">
Animation's key within the [AnimationPlayer] node. If empty, BTPlayAnimation will resume the last played animation if the [AnimationPlayer] was previously paused.
2023-08-13 17:38:14 +00:00
</member>
<member name="animation_player" type="BBNode" setter="set_animation_player" getter="get_animation_player">
2023-08-14 12:42:46 +00:00
Parameter that specifies the [AnimationPlayer] node.
2023-08-13 17:38:14 +00:00
</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, BTAwaitAnimation will return [code]FAILURE[/code]. If set to [code]0[/code], BTPlayAnimation doesn't wait for the animation to finish and immediately returns [code]SUCCESS[/code].
2023-08-13 17:38:14 +00:00
</member>
<member name="blend" type="float" setter="set_blend" getter="get_blend" default="-1.0">
Custom blend time (in seconds). See [method AnimationPlayer.play].
2023-08-13 17:38:14 +00:00
</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].
2023-08-13 17:38:14 +00:00
</member>
<member name="speed" type="float" setter="set_speed" getter="get_speed" default="1.0">
Custom playback speed scaling ratio. See [method AnimationPlayer.play].
2023-08-13 17:38:14 +00:00
</member>
</members>
</class>