BTAwaitAnimation

Inherits: BTAction < BTTask < BT

BT action that waits for an animation to finish playing.

Description

BTAwaitAnimation action waits for an animation on the specified AnimationPlayer node to finish playing and returns SUCCESS.

Returns SUCCESS if the specified animation has finished playing or if the specified animation is not currently playing.

Returns FAILURE if the specified animation doesn’t exist or if the action fails to get the AnimationPlayer node.

Properties

StringName

animation_name

&""

BBNode

animation_player

float

max_time

1.0


Property Descriptions

StringName animation_name = &""

  • void set_animation_name ( StringName value )

  • StringName get_animation_name ( )

Animation’s key within the AnimationPlayer node.


BBNode animation_player

  • void set_animation_player ( BBNode value )

  • BBNode get_animation_player ( )

Parameter that specifies the AnimationPlayer node.


float max_time = 1.0

  • void set_max_time ( float value )

  • float get_max_time ( )

The maximum duration to wait for the animation to complete (in seconds). If the animation doesn’t finish within this time, BTAwaitAnimation will return FAILURE.