Merge pull request #82 from limbonaut/fix-blackboard-plan-issues

Fix blackboard plan issues
This commit is contained in:
Serhii Snitsaruk 2024-03-26 17:08:06 +01:00 committed by GitHub
commit 31db4b4543
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 70 additions and 181 deletions

View File

@ -16,10 +16,11 @@ bool BlackboardPlan::_set(const StringName &p_name, const Variant &p_value) {
// * Editor
if (var_map.has(p_name)) {
var_map[p_name].set_value(p_value);
BBVariable &var = var_map[p_name];
var.set_value(p_value);
if (base.is_valid() && p_value == base->get_var(p_name).get_value()) {
// When user pressed reset property button in inspector...
var_map[p_name].reset_value_changed();
var.reset_value_changed();
}
return true;
}
@ -92,6 +93,12 @@ void BlackboardPlan::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(var.get_type(), var_name, var.get_hint(), var.get_hint_string(), PROPERTY_USAGE_EDITOR));
}
if (is_derived() && (!var.is_value_changed() || var.get_value() == base->var_map[var_name].get_value())) {
// Don't store variable if it's not modified in a derived plan.
// Variable is considered modified when it's marked as changed and its value is different from the base plan.
continue;
}
// * Storage
p_list->push_back(PropertyInfo(Variant::STRING, "var/" + var_name + "/name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL));
p_list->push_back(PropertyInfo(Variant::INT, "var/" + var_name + "/type", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL));
@ -133,6 +140,7 @@ bool BlackboardPlan::is_prefetching_nodepath_vars() const {
}
void BlackboardPlan::add_var(const StringName &p_name, const BBVariable &p_var) {
ERR_FAIL_COND(p_name == StringName());
ERR_FAIL_COND(var_map.has(p_name));
var_map.insert(p_name, p_var);
var_list.push_back(Pair<StringName, BBVariable>(p_name, p_var));
@ -191,6 +199,7 @@ void BlackboardPlan::rename_var(const StringName &p_name, const StringName &p_ne
ERR_FAIL_COND(!is_valid_var_name(p_new_name));
ERR_FAIL_COND(!var_map.has(p_name));
ERR_FAIL_COND(var_map.has(p_new_name));
BBVariable var = var_map[p_name];
Pair<StringName, BBVariable> new_entry(p_new_name, var);
@ -263,12 +272,17 @@ void BlackboardPlan::sync_with_base_plan() {
}
// Erase variables that do not exist in the base plan.
List<StringName> erase_list;
for (const Pair<StringName, BBVariable> &p : var_list) {
if (!base->has_var(p.first)) {
remove_var(p.first);
erase_list.push_back(p.first);
changed = true;
}
}
while (erase_list.size()) {
remove_var(erase_list.front()->get());
erase_list.pop_front();
}
// Sync order of variables.
// Glossary: E - element of current plan, B - element of base plan, F - element of current plan (used for forward search).

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://bpdm5jnegi38" path="res://demo/ai/trees/01_agent_melee_simple.tres" id="3_tb7cx"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_s08ac"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="AgentMeleeSimple" instance=ExtResource("1_l180o")]

View File

@ -5,16 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://ylife72ym5et" path="res://demo/ai/trees/02_agent_charger.tres" id="3_nacc3"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_pmyhf"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
var/charge_speed/name = "charge_speed"
var/charge_speed/type = 3
var/charge_speed/value = 1000.0
var/charge_speed/hint = 1
var/charge_speed/hint_string = "10,1000,10"
[node name="AgentCharger" instance=ExtResource("1_n83hi")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://c2bxoo68ywb27" path="res://demo/ai/trees/03_agent_imp.tres" id="3_furh3"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_aog23"]
var/speed/name = &"speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="AgentImp" instance=ExtResource("1_13xup")]

View File

@ -5,21 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://qqmjvbeibatn" path="res://demo/ai/trees/04_agent_skirmisher.tres" id="3_bhfkv"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_vjbry"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
var/fast_speed/name = "fast_speed"
var/fast_speed/type = 3
var/fast_speed/value = 600.0
var/fast_speed/hint = 1
var/fast_speed/hint_string = "10,1000,10"
var/slow_speed/name = "slow_speed"
var/slow_speed/type = 3
var/slow_speed/value = 300.0
var/slow_speed/hint = 1
var/slow_speed/hint_string = "10,1000,10"
[node name="AgentSkirmisher" instance=ExtResource("1_2ir76")]

View File

@ -5,16 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://cqluon1y1hnn5" path="res://demo/ai/trees/05_agent_ranged.tres" id="3_f7r5w"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_2kwy7"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
var/run_speed/name = "run_speed"
var/run_speed/type = 3
var/run_speed/value = 600.0
var/run_speed/hint = 1
var/run_speed/hint_string = "10,1000,10"
[node name="AgentRanged" instance=ExtResource("1_oa4xm")]

View File

@ -5,16 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://cpncl1db8j12f" path="res://demo/ai/trees/06_agent_melee_combo.tres" id="3_l805q"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_67ric"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
var/charge_speed/name = "charge_speed"
var/charge_speed/type = 3
var/charge_speed/value = 1000.0
var/charge_speed/hint = 0
var/charge_speed/hint_string = ""
[node name="AgentMeleeCombo" instance=ExtResource("1_dny3b")]

View File

@ -5,16 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://c2u6sljqkim0n" path="res://demo/ai/trees/07_agent_melee_nuanced.tres" id="3_b8kcf"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_tnf02"]
var/speed/name = &"speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
var/flank_speed/name = &"flank_speed"
var/flank_speed/type = 3
var/flank_speed/value = 600.0
var/flank_speed/hint = 1
var/flank_speed/hint_string = "10,1000,10"
[node name="AgentMeleeNuanced" instance=ExtResource("1_afx5l")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://cpcnbi81jqge4" path="res://demo/ai/trees/08_agent_demon.tres" id="3_ebd57"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_5sr4g"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="AgentDemon" instance=ExtResource("1_115kp")]

View File

@ -5,16 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://cpxk7jnqpwwlc" path="res://demo/ai/trees/09_agent_summoner.tres" id="3_bunpq"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_bqv3d"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 300.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
var/summon_cooldown/name = "summon_cooldown"
var/summon_cooldown/type = 1
var/summon_cooldown/value = false
var/summon_cooldown/hint = 0
var/summon_cooldown/hint_string = ""
[node name="AgentSummoner" instance=ExtResource("1_neifu")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://b1mfh8yad7rmw" path="res://demo/ai/trees/tutorial/tutorial_01_welcome.tres" id="3_ilmgw"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_52mdk"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="TutorialWelcome" instance=ExtResource("1_2vrmp")]

View File

@ -5,16 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://b1i0xo0o676va" path="res://demo/ai/trees/tutorial/tutorial_02_introduction.tres" id="3_3esuy"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_52mdk"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
var/flank_speed/name = "flank_speed"
var/flank_speed/type = 3
var/flank_speed/value = 600.0
var/flank_speed/hint = 1
var/flank_speed/hint_string = "10,1000,10"
[node name="TutorialIntro" instance=ExtResource("1_lia2k")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://cb0ybf24ahnc3" path="res://demo/ai/trees/tutorial/tutorial_03_types.tres" id="3_a31ka"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_52mdk"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="TutorialTypes" instance=ExtResource("1_p8nwq")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://dln8ywvtqedt7" path="res://demo/ai/trees/tutorial/tutorial_04_sequence.tres" id="3_feewj"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_52mdk"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="TutorialSequence" instance=ExtResource("1_oibr1")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://bf4r652fv5kwi" path="res://demo/ai/trees/tutorial/tutorial_05_selector.tres" id="3_pm5ep"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_52mdk"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="TutorialSelector" instance=ExtResource("1_62fs7")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://beiki511huxb8" path="res://demo/ai/trees/tutorial/tutorial_06_decorators.tres" id="3_tpgll"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_52mdk"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="TutorialDecorators" instance=ExtResource("1_mbrnd")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://tep50j4d6kgp" path="res://demo/ai/trees/tutorial/tutorial_07_more_decorators.tres" id="3_ta3g6"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_52mdk"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="TutorialMoreDecorators" instance=ExtResource("1_k4qfc")]

View File

@ -5,11 +5,6 @@
[ext_resource type="BehaviorTree" uid="uid://dp0cglcytwcj5" path="res://demo/ai/trees/tutorial/tutorial_08_final_touch.tres" id="3_c5qx4"]
[sub_resource type="BlackboardPlan" id="BlackboardPlan_52mdk"]
var/speed/name = "speed"
var/speed/type = 3
var/speed/value = 400.0
var/speed/hint = 1
var/speed/hint_string = "10,1000,10"
[node name="TutorialFinalTouch" instance=ExtResource("1_bjdsc")]

View File

@ -25,14 +25,14 @@ animation_name = &"walk"
script = ExtResource("1_as4cg")
range_min = 300.0
range_max = 500.0
position_var = "pos"
position_var = &"pos"
[sub_resource type="BTAction" id="BTAction_tdkpj"]
script = ExtResource("2_dlpnp")
target_position_var = "pos"
speed_var = "speed"
target_position_var = &"pos"
speed_var = &"speed"
tolerance = 50.0
avoid_var = ""
avoid_var = &""
[sub_resource type="BTSequence" id="BTSequence_echit"]
children = [SubResource("BTPlayAnimation_57u80"), SubResource("BTAction_11xvc"), SubResource("BTAction_tdkpj")]
@ -43,17 +43,17 @@ children = [SubResource("BTSequence_echit")]
[sub_resource type="BTAction" id="BTAction_124bm"]
script = ExtResource("3_uv18s")
group = &"player"
output_var = "target"
output_var = &"target"
[sub_resource type="BTCondition" id="BTCondition_n25o8"]
script = ExtResource("4_k3g8t")
distance_min = 0.0
distance_max = 200.0
target_var = "target"
target_var = &"target"
[sub_resource type="BTAction" id="BTAction_1hfgr"]
script = ExtResource("5_thvy5")
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_ilr2h"]
resource_name = "AnimationPlayer"

View File

@ -33,14 +33,14 @@ animation_name = &"walk"
script = ExtResource("1_gk66j")
range_min = 300.0
range_max = 500.0
position_var = "pos"
position_var = &"pos"
[sub_resource type="BTAction" id="BTAction_djl5v"]
script = ExtResource("2_v5eou")
target_position_var = "pos"
speed_var = "speed"
target_position_var = &"pos"
speed_var = &"speed"
tolerance = 50.0
avoid_var = ""
avoid_var = &""
[sub_resource type="BTFail" id="BTFail_i2f36"]

View File

@ -17,7 +17,7 @@ var/speed/hint_string = "10,1000,10"
script = ExtResource("2_jfsyt")
distance_min = 0.0
distance_max = 200.0
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_icf24"]
resource_name = "AnimationPlayer"
@ -31,14 +31,14 @@ animation_name = &"walk"
script = ExtResource("1_rvh1c")
range_min = 700.0
range_max = 800.0
position_var = "pos"
position_var = &"pos"
[sub_resource type="BTAction" id="BTAction_y1you"]
script = ExtResource("2_t62a0")
target_position_var = "pos"
speed_var = "speed"
target_position_var = &"pos"
speed_var = &"speed"
tolerance = 50.0
avoid_var = ""
avoid_var = &""
[sub_resource type="BBNode" id="BBNode_ayt56"]
resource_name = "AnimationPlayer"
@ -58,7 +58,7 @@ children = [SubResource("BTCondition_x0uu7"), SubResource("BTPlayAnimation_iiei3
script = ExtResource("2_jfsyt")
distance_min = 200.0
distance_max = 10000.0
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_6d0yy"]
resource_name = "AnimationPlayer"
@ -70,8 +70,8 @@ animation_name = &"walk"
[sub_resource type="BTAction" id="BTAction_wc11r"]
script = ExtResource("2_nnswb")
target_var = "target"
speed_var = "speed"
target_var = &"target"
speed_var = &"speed"
approach_distance = 100.0
[sub_resource type="BBNode" id="BBNode_aw5jj"]
@ -91,7 +91,7 @@ children = [SubResource("BTCondition_d6aub"), SubResource("BTPlayAnimation_wsspf
[sub_resource type="BTAction" id="BTAction_2murg"]
script = ExtResource("1_3ed74")
group = &"player"
output_var = "target"
output_var = &"target"
[sub_resource type="BTSelector" id="BTSelector_ddhoo"]
children = [SubResource("BTSequence_cgwor"), SubResource("BTSequence_vx4uy"), SubResource("BTAction_2murg")]

View File

@ -17,7 +17,7 @@ var/speed/hint_string = "10,1000,10"
[sub_resource type="BTAction" id="BTAction_2murg"]
script = ExtResource("1_3xoj7")
group = &"player"
output_var = "target"
output_var = &"target"
[sub_resource type="BTRunLimit" id="BTRunLimit_60b8b"]
children = [SubResource("BTAction_2murg")]
@ -26,11 +26,11 @@ children = [SubResource("BTAction_2murg")]
script = ExtResource("2_08b67")
distance_min = 0.0
distance_max = 200.0
target_var = "target"
target_var = &"target"
[sub_resource type="BTAction" id="BTAction_oc76s"]
script = ExtResource("3_orhnl")
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_6d0yy"]
resource_name = "AnimationPlayer"
@ -52,7 +52,7 @@ duration = 5.0
script = ExtResource("2_08b67")
distance_min = 0.0
distance_max = 200.0
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_icf24"]
resource_name = "AnimationPlayer"
@ -66,14 +66,14 @@ animation_name = &"walk"
script = ExtResource("4_oyght")
range_min = 700.0
range_max = 800.0
position_var = "pos"
position_var = &"pos"
[sub_resource type="BTAction" id="BTAction_y1you"]
script = ExtResource("5_5o1gy")
target_position_var = "pos"
speed_var = "speed"
target_position_var = &"pos"
speed_var = &"speed"
tolerance = 50.0
avoid_var = ""
avoid_var = &""
[sub_resource type="BBNode" id="BBNode_ayt56"]
resource_name = "AnimationPlayer"
@ -93,7 +93,7 @@ children = [SubResource("BTCondition_x0uu7"), SubResource("BTPlayAnimation_iiei3
script = ExtResource("2_08b67")
distance_min = 200.0
distance_max = 10000.0
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_rpwld"]
resource_name = "AnimationPlayer"
@ -105,8 +105,8 @@ animation_name = &"walk"
[sub_resource type="BTAction" id="BTAction_wc11r"]
script = ExtResource("6_rpn40")
target_var = "target"
speed_var = "speed"
target_var = &"target"
speed_var = &"speed"
approach_distance = 100.0
[sub_resource type="BBNode" id="BBNode_aw5jj"]

View File

@ -16,7 +16,7 @@ var/speed/hint_string = "10,1000,10"
[sub_resource type="BTAction" id="BTAction_2murg"]
script = ExtResource("1_f605f")
group = &"player"
output_var = "target"
output_var = &"target"
[sub_resource type="BTRunLimit" id="BTRunLimit_60b8b"]
children = [SubResource("BTAction_2murg")]
@ -25,11 +25,11 @@ children = [SubResource("BTAction_2murg")]
script = ExtResource("2_mj1cj")
distance_min = 0.0
distance_max = 200.0
target_var = "target"
target_var = &"target"
[sub_resource type="BTAction" id="BTAction_oc76s"]
script = ExtResource("3_86p0r")
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_6d0yy"]
resource_name = "AnimationPlayer"
@ -60,7 +60,7 @@ duration = 5.0
script = ExtResource("2_mj1cj")
distance_min = 0.0
distance_max = 200.0
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_wksgd"]
resource_name = "AnimationPlayer"
@ -72,7 +72,7 @@ animation_name = &"walk"
[sub_resource type="BTAction" id="BTAction_6q0k4"]
script = ExtResource("4_u0vk1")
speed_var = "speed"
speed_var = &"speed"
max_angle_deviation = 0.7
[sub_resource type="BTTimeLimit" id="BTTimeLimit_6eii7"]
@ -100,7 +100,7 @@ children = [SubResource("BTCondition_x0uu7"), SubResource("BTPlayAnimation_umlwj
script = ExtResource("2_mj1cj")
distance_min = 200.0
distance_max = 10000.0
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_rpwld"]
resource_name = "AnimationPlayer"
@ -112,8 +112,8 @@ animation_name = &"walk"
[sub_resource type="BTAction" id="BTAction_wc11r"]
script = ExtResource("6_1yikm")
target_var = "target"
speed_var = "speed"
target_var = &"target"
speed_var = &"speed"
approach_distance = 100.0
[sub_resource type="BBNode" id="BBNode_aw5jj"]

View File

@ -18,7 +18,7 @@ var/speed/hint_string = "10,1000,10"
[sub_resource type="BTAction" id="BTAction_2murg"]
script = ExtResource("1_o5ahw")
group = &"player"
output_var = "target"
output_var = &"target"
[sub_resource type="BTRunLimit" id="BTRunLimit_60b8b"]
children = [SubResource("BTAction_2murg")]
@ -27,11 +27,11 @@ children = [SubResource("BTAction_2murg")]
script = ExtResource("5_er18b")
distance_min = 0.0
distance_max = 200.0
target_var = "target"
target_var = &"target"
[sub_resource type="BTAction" id="BTAction_oc76s"]
script = ExtResource("4_128ei")
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_6d0yy"]
resource_name = "AnimationPlayer"
@ -62,7 +62,7 @@ duration = 5.0
script = ExtResource("5_er18b")
distance_min = 0.0
distance_max = 200.0
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_wksgd"]
resource_name = "AnimationPlayer"
@ -74,7 +74,7 @@ animation_name = &"walk"
[sub_resource type="BTAction" id="BTAction_6q0k4"]
script = ExtResource("6_1urfq")
speed_var = "speed"
speed_var = &"speed"
max_angle_deviation = 0.7
[sub_resource type="BTTimeLimit" id="BTTimeLimit_6eii7"]
@ -100,11 +100,11 @@ children = [SubResource("BTCondition_x0uu7"), SubResource("BTPlayAnimation_umlwj
[sub_resource type="BTAction" id="BTAction_n0rxm"]
script = ExtResource("2_er25a")
target_var = "target"
target_var = &"target"
flank_side = 0
range_min = 400
range_max = 500
position_var = "pos"
position_var = &"pos"
[sub_resource type="BBNode" id="BBNode_icf24"]
resource_name = "AnimationPlayer"
@ -116,14 +116,14 @@ animation_name = &"walk"
[sub_resource type="BTAction" id="BTAction_g2up4"]
script = ExtResource("3_ed1xo")
target_position_var = "pos"
speed_var = "speed"
target_position_var = &"pos"
speed_var = &"speed"
tolerance = 50.0
avoid_var = ""
avoid_var = &""
[sub_resource type="BTAction" id="BTAction_d5lkr"]
script = ExtResource("4_128ei")
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_h4k80"]
resource_name = "AnimationPlayer"
@ -163,7 +163,7 @@ run_chance = 0.25
script = ExtResource("5_er18b")
distance_min = 200.0
distance_max = 10000.0
target_var = "target"
target_var = &"target"
[sub_resource type="BBNode" id="BBNode_rpwld"]
resource_name = "AnimationPlayer"
@ -175,8 +175,8 @@ animation_name = &"walk"
[sub_resource type="BTAction" id="BTAction_wc11r"]
script = ExtResource("7_ekws5")
target_var = "target"
speed_var = "speed"
target_var = &"target"
speed_var = &"speed"
approach_distance = 100.0
[sub_resource type="BBNode" id="BBNode_aw5jj"]