157 lines
5.4 KiB
Plaintext
157 lines
5.4 KiB
Plaintext
[gd_resource type="BehaviorTree" load_steps=42 format=3 uid="uid://blccr23qjixws"]
|
|
|
|
[ext_resource type="BehaviorTree" uid="uid://caxmpcyhpt6em" path="res://ai/trees/wander.tres" id="1_rsg0c"]
|
|
[ext_resource type="Script" path="res://ai/tasks/find_target_by_name.gd" id="1_v4edy"]
|
|
[ext_resource type="Script" path="res://ai/tasks/navigate_to_location.gd" id="2_k36i0"]
|
|
[ext_resource type="Script" path="res://ai/tasks/get_target_location.gd" id="2_ytv0s"]
|
|
[ext_resource type="Script" path="res://ai/tasks/calc_distance_to_location.gd" id="3_wfof3"]
|
|
[ext_resource type="Script" path="res://ai/tasks/check_target_node_visible.gd" id="4_dskwm"]
|
|
[ext_resource type="Script" path="res://ai/tasks/look_at_location.gd" id="5_s0awd"]
|
|
|
|
[sub_resource type="BlackboardPlan" id="BlackboardPlan_psomx"]
|
|
|
|
[sub_resource type="BTAction" id="BTAction_dafbx"]
|
|
script = ExtResource("1_v4edy")
|
|
target_name = "Timmy"
|
|
output_var = &"owner_node"
|
|
|
|
[sub_resource type="BTAction" id="BTAction_byeb5"]
|
|
script = ExtResource("2_ytv0s")
|
|
max_distance = 1.0
|
|
target_var = &"owner_node"
|
|
output_var = &"owner_location"
|
|
|
|
[sub_resource type="BTAction" id="BTAction_6cy6k"]
|
|
script = ExtResource("3_wfof3")
|
|
target_location_var = &"owner_location"
|
|
output_var = &"owner_distance"
|
|
|
|
[sub_resource type="BTSequence" id="BTSequence_d4i2b"]
|
|
custom_name = "FindTimmy"
|
|
children = [SubResource("BTAction_dafbx"), SubResource("BTAction_byeb5"), SubResource("BTAction_6cy6k")]
|
|
|
|
[sub_resource type="BBVariant" id="BBVariant_doyi6"]
|
|
type = 3
|
|
saved_value = 3.0
|
|
resource_name = "3"
|
|
|
|
[sub_resource type="BTCheckVar" id="BTCheckVar_nbtfc"]
|
|
variable = &"owner_distance"
|
|
check_type = 2
|
|
value = SubResource("BBVariant_doyi6")
|
|
|
|
[sub_resource type="BTAction" id="BTAction_6rb0n"]
|
|
script = ExtResource("2_k36i0")
|
|
target_var = &"owner_location"
|
|
distance = 1.0
|
|
|
|
[sub_resource type="BTRandomWait" id="BTRandomWait_od78y"]
|
|
min_duration = 2.0
|
|
max_duration = 3.0
|
|
|
|
[sub_resource type="BlackboardPlan" id="BlackboardPlan_nhnw2"]
|
|
prefetch_nodepath_vars = false
|
|
|
|
[sub_resource type="BTSubtree" id="BTSubtree_5fxm2"]
|
|
subtree = ExtResource("1_rsg0c")
|
|
blackboard_plan = SubResource("BlackboardPlan_nhnw2")
|
|
|
|
[sub_resource type="BTAction" id="BTAction_iyfuf"]
|
|
script = ExtResource("5_s0awd")
|
|
target_location_var = &"owner_location"
|
|
|
|
[sub_resource type="BTAction" id="BTAction_xibbh"]
|
|
script = ExtResource("2_k36i0")
|
|
target_var = &"owner_location"
|
|
distance = 1.0
|
|
|
|
[sub_resource type="BTRandomWait" id="BTRandomWait_8ibvw"]
|
|
min_duration = 2.0
|
|
max_duration = 3.0
|
|
|
|
[sub_resource type="BTSequence" id="BTSequence_b1uqq"]
|
|
children = [SubResource("BTAction_iyfuf"), SubResource("BTAction_xibbh"), SubResource("BTRandomWait_8ibvw")]
|
|
|
|
[sub_resource type="BTRandomSelector" id="BTRandomSelector_3126q"]
|
|
children = [SubResource("BTSubtree_5fxm2"), SubResource("BTSequence_b1uqq")]
|
|
|
|
[sub_resource type="BTRepeat" id="BTRepeat_aqfoo"]
|
|
forever = true
|
|
children = [SubResource("BTRandomSelector_3126q")]
|
|
|
|
[sub_resource type="BTSequence" id="BTSequence_bn3or"]
|
|
custom_name = "WanderNearTimmy"
|
|
children = [SubResource("BTSequence_d4i2b"), SubResource("BTCheckVar_nbtfc"), SubResource("BTAction_6rb0n"), SubResource("BTRandomWait_od78y"), SubResource("BTRepeat_aqfoo")]
|
|
|
|
[sub_resource type="BTAction" id="BTAction_u48vm"]
|
|
script = ExtResource("1_v4edy")
|
|
target_name = "Player"
|
|
output_var = &"player_node"
|
|
|
|
[sub_resource type="BTAction" id="BTAction_iv8pd"]
|
|
script = ExtResource("2_ytv0s")
|
|
max_distance = 1.0
|
|
target_var = &"player_node"
|
|
output_var = &"player_location"
|
|
|
|
[sub_resource type="BTAction" id="BTAction_n4o2j"]
|
|
script = ExtResource("3_wfof3")
|
|
target_location_var = &"player_location"
|
|
output_var = &"player_distance"
|
|
|
|
[sub_resource type="BBVariant" id="BBVariant_55npk"]
|
|
type = 3
|
|
saved_value = 3.0
|
|
resource_name = "3"
|
|
|
|
[sub_resource type="BTCheckVar" id="BTCheckVar_0y1pg"]
|
|
variable = &"player_distance"
|
|
check_type = 2
|
|
value = SubResource("BBVariant_55npk")
|
|
|
|
[sub_resource type="BTAction" id="BTAction_07lxa"]
|
|
script = ExtResource("4_dskwm")
|
|
target_node_var = &"player_node"
|
|
|
|
[sub_resource type="BTSequence" id="BTSequence_prkrm"]
|
|
custom_name = "FindPlayer"
|
|
children = [SubResource("BTAction_u48vm"), SubResource("BTAction_iv8pd"), SubResource("BTAction_n4o2j"), SubResource("BTCheckVar_0y1pg"), SubResource("BTAction_07lxa")]
|
|
|
|
[sub_resource type="BTAction" id="BTAction_p8by2"]
|
|
script = ExtResource("5_s0awd")
|
|
target_location_var = &"player_location"
|
|
|
|
[sub_resource type="BTAction" id="BTAction_euy6e"]
|
|
script = ExtResource("2_k36i0")
|
|
target_var = &"player_location"
|
|
distance = 0.1
|
|
|
|
[sub_resource type="BTAction" id="BTAction_12d23"]
|
|
script = ExtResource("5_s0awd")
|
|
target_location_var = &"player_location"
|
|
|
|
[sub_resource type="BTParallel" id="BTParallel_ocd8a"]
|
|
children = [SubResource("BTAction_12d23")]
|
|
|
|
[sub_resource type="BTSequence" id="BTSequence_jneh0"]
|
|
custom_name = "FollowPlayer"
|
|
children = [SubResource("BTSequence_prkrm"), SubResource("BTAction_p8by2"), SubResource("BTAction_euy6e"), SubResource("BTParallel_ocd8a")]
|
|
|
|
[sub_resource type="BlackboardPlan" id="BlackboardPlan_v4y5q"]
|
|
prefetch_nodepath_vars = false
|
|
|
|
[sub_resource type="BTSubtree" id="BTSubtree_clqa0"]
|
|
subtree = ExtResource("1_rsg0c")
|
|
blackboard_plan = SubResource("BlackboardPlan_v4y5q")
|
|
custom_name = "Wander"
|
|
|
|
[sub_resource type="BTSelector" id="BTSelector_dolqa"]
|
|
children = [SubResource("BTSequence_bn3or"), SubResource("BTSequence_jneh0"), SubResource("BTSubtree_clqa0")]
|
|
|
|
[sub_resource type="BTSequence" id="BTSequence_y2c1w"]
|
|
children = [SubResource("BTSelector_dolqa")]
|
|
|
|
[resource]
|
|
blackboard_plan = SubResource("BlackboardPlan_psomx")
|
|
root_task = SubResource("BTSequence_y2c1w")
|