<1074> <1/> save_var = <2/> πŸ”— <1075> <1/> set_save_var(value: <2/>) <1076> <1/> get_save_var() <1077> A Blackboard variable used to store an element of the array referenced by array_var. <1078> BTInstance <1079> Represents a runtime instance of a BehaviorTree resource. <1080> Can be created using the BehaviorTree.instantiate method. <1081> monitor_performance <1082> get_agent() <2/> <1083> get_blackboard() <2/> <1084> get_last_status() <2/> <1085> get_owner_node() <2/> <1086> get_root_task() <2/> <1087> get_source_bt_path() <2/> <1088> is_instance_valid() <2/> <1089> register_with_debugger() <1090> unregister_with_debugger() <1091> update(delta: <2/>) <1092> freed() πŸ”— <1093> Emitted when the behavior tree instance is freed. Used by debugger to unregister. <1094> updated(status: <1/>) πŸ”— <1095> Emitted when the behavior tree instance has finished updating. <1096> <1/> monitor_performance = <2/> πŸ”— <1097> If <1/>, adds a performance monitor for this instance to β€œDebugger->Monitors” in the editor. <1098> <1/> get_agent() <2/> πŸ”— <1099> Returns the agent of the behavior tree instance. <1100> Blackboard get_blackboard() <2/> πŸ”— <1101> Returns the blackboard of the behavior tree instance. <1102> Status get_last_status() <2/> πŸ”— <1103> Returns the execution status of the last update. <1104> <1/> get_owner_node() <2/> πŸ”— <1105> Returns the scene <1/> that owns this behavior tree instance. <1106> BTTask get_root_task() <2/> πŸ”— <1107> Returns the root task of the behavior tree instance. <1108> <1/> get_source_bt_path() <2/> πŸ”— <1109> Returns the file path to the behavior tree resource that was used to create this instance. <1110> <1/> is_instance_valid() <2/> πŸ”— <1111> Returns <1/> if the behavior tree instance is properly initialized and can be used. <1112> <1/> register_with_debugger() πŸ”— <1113> Registers the behavior tree instance with the debugger. <1114> <1/> unregister_with_debugger() πŸ”— <1115> Unregisters the behavior tree instance from the debugger. This is typically not necessary, as the debugger will automatically unregister the instance when it is freed. <1116> Status update(delta: <2/>) πŸ”— <1117> Ticks the behavior tree instance and returns its status. <1118> BTInvert <1119> BT decorator that transforms <1/> into <2/> and <3/> into <4/>. <1120> BTInvert transforms <1/> into <2/> and <3/> into <4/>. <1121> BTNewScope <1122> Inherited By: BTSubtree <1123> BT decorator that creates a new Blackboard scope. <1124> BTNewScope creates a new Blackboard scope during initialization and populates it with data. See Blackboard. <1125> Returns the status of the child task execution. <1126> blackboard_plan <1127> BlackboardPlan blackboard_plan πŸ”— <1128> BTParallel <1129> BT composite that executes all of its child tasks simultaneously. <1130> BTParallel executes all of its child tasks simultaneously. Note that BTParallel doesn’t involve multithreading. It processes each task sequentially, from first to last, in the same tick before returning a result. If one of the abort criterea is met, any tasks currently <1/> will be terminated, and the result will be either <2/> or <3/>. The num_failures_required determines when BTParallel fails and num_successes_required when it succeeds. When both are fullfilled, it gives priority to num_failures_required. <1131> If set to repeat, all child tasks will be re-executed each tick, regardless of whether they previously resulted in <2/> or <3/>. <1132> Returns <1/> when the required number of child tasks result in <2/>. When repeat is set to <4/>, if none of the criteria were met and all child tasks resulted in either <5/> or <6/>, BTParallel will return <7/>. <1133> Returns <1/> when the required number of child tasks result in <2/>. <1134> Returns <1/> if none of the criterea were fulfilled, and either repeat is set to <3/> or a child task resulted in <4/>. <1135> num_failures_required <1136> num_successes_required <1137> repeat <1138> <1/> num_failures_required = <2/> πŸ”— <1139> <1/> set_num_failures_required(value: <2/>) <1140> <1/> get_num_failures_required() <1141> If the specified number of child tasks return <1/>, BTParallel will also return <2/>. <1142> <1/> num_successes_required = <2/> πŸ”— <1143> <1/> set_num_successes_required(value: <2/>) <1144> <1/> get_num_successes_required() <1145> If the specified number of child tasks return <1/>, BTParallel will also return <2/>. <1146> <1/> repeat = <2/> πŸ”— <1147> <1/> set_repeat(value: <2/>) <1148> <1/> get_repeat() <1149> When <1/>, the child tasks will be executed again, regardless of whether they previously resulted in a <2/> or <3/>. <1150> When <1/>, if none of the criteria were met, and all child tasks resulted in a <2/> or <3/>, BTParallel will return <4/>. <1151> BTPauseAnimation <1152> BT action that pauses the playback of an animation on the specified <1/> node. <1153> BTPauseAnimation action pauses the playback of an animation on the specified <1/> node and returns <2/>. <1154> Returns <1/> if the action fails to get the <2/> node. <1155> animation_player <1156> BBNode animation_player πŸ”— <1157> BTPlayAnimation <1158> BT action that plays an animation on the specified <1/> node. <1159> BTPlayAnimation action plays an animation on the specified <1/> node. If the await_completion is greater than <3/>, the action will wait for the animation to complete, with the maximum waiting time equal to await_completion. <1160> Returns <1/> if the animation finishes playing or if the elapsed time exceeds await_completion. When await_completion is set to <4/>, BTPlayAnimation doesn’t wait for the animation to finish and immediately returns <5/>. <1161> Returns <1/> if the animation is still playing and the elapsed time is less than await_completion. <1162> Returns <1/> if the action fails to play the requested animation. <1163> animation_name <1164> animation_player <1165> await_completion <1166> blend <1167> from_end <1168> speed <1169> <1/> animation_name = <2/> πŸ”— <1170> Animation’s key within the <1/> node. If empty, BTPlayAnimation will resume the last played animation if the <2/> was previously paused. <1171> BBNode animation_player πŸ”— <1172> <1/> await_completion = <2/> πŸ”— <1173> <1/> set_await_completion(value: <2/>) <1174> <1/> get_await_completion() <1175> 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 <1/>. <1176> <1/> blend = <2/> πŸ”— <1177> <1/> set_blend(value: <2/>) <1178> <1/> get_blend() <1179> Custom blend time (in seconds). See AnimationPlayer.play. <1180> <1/> from_end = <2/> πŸ”— <1181> <1/> set_from_end(value: <2/>) <1182> <1/> get_from_end() <1183> Play animation from the end. Used in combination with negative speed to play animation in reverse. See AnimationPlayer.play. <1184> <1/> speed = <2/> πŸ”— <1185> <1/> set_speed(value: <2/>) <1186> <1/> get_speed() <1187> Custom playback speed scaling ratio. See AnimationPlayer.play. <1188> BTProbability <1189> BT decorator that executes its child task with a given probability. <1190> BTProbability executes its child task with a given probability defined by run_chance. <1191> Returns the result of the child task if it was executed; otherwise, it returns <1/>. <1192> run_chance <1193> <1/> run_chance = <2/> πŸ”— <1194> <1/> set_run_chance(value: <2/>) <1195> <1/> get_run_chance() <1196> Probability that defines how likely the child task will be executed. <1197> BTProbabilitySelector <1198> BT composite that chooses a child task to execute based on attached probabilities. <1199> BTProbabilitySelector chooses a child task to execute based on attached probabilities. It is typically used for decision-making purposes. Probability distribution is calculated based on weights assigned to each child task. <1200> Returns <1/> when a child task results in <2/>. <1201> Returns <1/> when a child task results in <2/>. <1202> The behavior of BTProbabilitySelector when a child task results in <1/> depends on the abort_on_failure value: <1203> If abort_on_failure is <2/>, when a child task results in <3/>, BTProbabilitySelector will normalize the probability distribution over the remaining children and choose a new child task to be executed. If all child tasks fail, the composite will return <4/>. <1204> If abort_on_failure is <2/>, when a child task results in <3/>, BTProbabilitySelector will not choose another child task to be executed and will immediately return <4/>. <1205> abort_on_failure <1206> get_probability(child_idx: <2/>) <3/> <1207> get_total_weight() <2/> <1208> get_weight(child_idx: <2/>) <3/> <1209> has_probability(child_idx: <2/>) <3/> <1210> set_probability(child_idx: <2/>, probability: <3/>) <1211> set_weight(child_idx: <2/>, weight: <3/>) <1212> <1/> abort_on_failure = <2/> πŸ”— <1213> <1/> set_abort_on_failure(value: <2/>) <1214> <1/> get_abort_on_failure() <1215> If <1/>, BTProbabilitySelector will not choose another child to execute and will return <2/> when a child task results in <3/>. <1216> <1/> get_probability(child_idx: <2/>) <3/> πŸ”— <1217> Returns the child task’s selection probability. <1218> <1/> get_total_weight() <2/> πŸ”— <1219> Returns the total weight of all child tasks. <1220> <1/> get_weight(child_idx: <2/>) <3/> πŸ”— <1221> Returns the child task’s weight within the weighted probability selection algorithm. <1222> <1/> has_probability(child_idx: <2/>) <3/> πŸ”— <1223> Returns whether the child task at index <1/> participates within the weighted probability selection algorithm and has a probability assigned to it. Returns <2/> for BTComment tasks. <1224> <1/> set_probability(child_idx: <2/>, probability: <3/>) πŸ”— <1225> Sets the child task’s weight calculated based on the desired probability. <1226> <1/> set_weight(child_idx: <2/>, weight: <3/>) πŸ”— <1227> Sets the child task’s weight for the weighted probability selection algorithm. <1228> BTRandomSelector <1229> BT composite that executes tasks in random order until first <1/>. <1230> BTRandomSelector executes its child tasks in a random order until any child returns <1/>. If a child task results in <2/>, BTRandomSelector will immediately execute another child task until one of them returns <3/> or all of them result in <4/>. <1231> Returns <1/> if a child task results in <2/>. BTRandomSelector will remember the execution order and the last child task that returned <3/>, ensuring it resumes from that point in the next tick.