2024-12-28 16:36:17 +01:00
|
|
|
[gd_resource type="BehaviorTree" load_steps=18 format=3 uid="uid://ci1dpjqvsq0ax"]
|
2024-12-28 16:34:30 +01:00
|
|
|
|
|
|
|
[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_rxiwf"]
|
|
|
|
var/target_distance/name = &"target_distance"
|
|
|
|
var/target_distance/type = 3
|
|
|
|
var/target_distance/value = 0.0
|
|
|
|
var/target_distance/hint = 0
|
|
|
|
var/target_distance/hint_string = ""
|
|
|
|
|
|
|
|
[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_02yjb"]
|
|
|
|
|
|
|
|
[sub_resource type="BTSubtree" id="BTSubtree_dnwew"]
|
|
|
|
subtree = ExtResource("5_n3u5i")
|
|
|
|
blackboard_plan = SubResource("BlackboardPlan_02yjb")
|
|
|
|
|
|
|
|
[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_rxiwf")
|
2024-12-28 16:36:17 +01:00
|
|
|
root_task = SubResource("BTSequence_yk8po")
|