TinyAdventure/ai/trees/look_around_or_focus_player...

59 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2024-12-28 16:36:17 +01:00
[gd_resource type="BehaviorTree" load_steps=18 format=3 uid="uid://ci1dpjqvsq0ax"]
[ext_resource type="Script" path="res://ai/tasks/find_target_by_name.gd" id="1_crjnn"]
[ext_resource type="Script" path="res://ai/tasks/get_target_location.gd" id="2_a4moq"]
[ext_resource type="Script" path="res://ai/tasks/calc_distance_to_location.gd" id="3_21rvk"]
[ext_resource type="Script" path="res://ai/tasks/look_at_location.gd" id="4_0f2uh"]
[ext_resource type="BehaviorTree" uid="uid://2v14hwp2gtg" path="res://ai/trees/look_around.tres" id="5_n3u5i"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_26j5y"]
[sub_resource type="BTAction" id="BTAction_rgjhs"]
script = ExtResource("1_crjnn")
target_name = "Player"
output_var = &"target"
[sub_resource type="BTAction" id="BTAction_2cqtn"]
script = ExtResource("2_a4moq")
max_distance = 1.0
target_var = &"target"
output_var = &"target_location"
[sub_resource type="BTAction" id="BTAction_rp83o"]
script = ExtResource("3_21rvk")
target_location_var = &"target_location"
output_var = &"target_distance"
[sub_resource type="BBVariant" id="BBVariant_4v4ud"]
type = 3
saved_value = 2.0
resource_name = "2"
[sub_resource type="BTCheckVar" id="BTCheckVar_0itqd"]
variable = &"target_distance"
check_type = 2
value = SubResource("BBVariant_4v4ud")
[sub_resource type="BTAction" id="BTAction_4e23b"]
script = ExtResource("4_0f2uh")
target_location_var = &"target_location"
[sub_resource type="BTSequence" id="BTSequence_ytwco"]
children = [SubResource("BTCheckVar_0itqd"), SubResource("BTAction_4e23b")]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_biy6r"]
[sub_resource type="BTSubtree" id="BTSubtree_dnwew"]
subtree = ExtResource("5_n3u5i")
blackboard_plan = SubResource("BlackboardPlan_biy6r")
[sub_resource type="BTSelector" id="BTSelector_cu7cu"]
children = [SubResource("BTSequence_ytwco"), SubResource("BTSubtree_dnwew")]
[sub_resource type="BTSequence" id="BTSequence_yk8po"]
children = [SubResource("BTAction_rgjhs"), SubResource("BTAction_2cqtn"), SubResource("BTAction_rp83o"), SubResource("BTSelector_cu7cu")]
[resource]
blackboard_plan = SubResource("BlackboardPlan_26j5y")
2024-12-28 16:36:17 +01:00
root_task = SubResource("BTSequence_yk8po")