diff --git a/demo/demo/agents/tutorial/tutorial_01_welcome.tscn b/demo/demo/agents/tutorial/tutorial_01_welcome.tscn index f69aa7d..776c241 100644 --- a/demo/demo/agents/tutorial/tutorial_01_welcome.tscn +++ b/demo/demo/agents/tutorial/tutorial_01_welcome.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://ooigbfhfy4wa" path="res://demo/agents/agent_base.tscn" id="1_2vrmp"] [ext_resource type="Texture2D" uid="uid://b0oeqsc0xksto" path="res://demo/assets/agent_junior_pieces.png" id="2_3h4dj"] -[ext_resource type="BehaviorTree" uid="uid://b1mfh8yad7rmw" path="res://demo/ai/tutorial_trees/tutorial_01_welcome.tres" id="3_ilmgw"] +[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" diff --git a/demo/demo/agents/tutorial/tutorial_02_introduction.tscn b/demo/demo/agents/tutorial/tutorial_02_introduction.tscn index 910f982..819fbf6 100644 --- a/demo/demo/agents/tutorial/tutorial_02_introduction.tscn +++ b/demo/demo/agents/tutorial/tutorial_02_introduction.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://ooigbfhfy4wa" path="res://demo/agents/agent_base.tscn" id="1_lia2k"] [ext_resource type="Texture2D" uid="uid://b0oeqsc0xksto" path="res://demo/assets/agent_junior_pieces.png" id="2_4x2l4"] -[ext_resource type="BehaviorTree" uid="uid://b1i0xo0o676va" path="res://demo/ai/tutorial_trees/tutorial_02_introduction.tres" id="3_3esuy"] +[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" diff --git a/demo/demo/agents/tutorial/tutorial_03_types.tscn b/demo/demo/agents/tutorial/tutorial_03_types.tscn index ccb13d3..c54cba6 100644 --- a/demo/demo/agents/tutorial/tutorial_03_types.tscn +++ b/demo/demo/agents/tutorial/tutorial_03_types.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://ooigbfhfy4wa" path="res://demo/agents/agent_base.tscn" id="1_p8nwq"] [ext_resource type="Texture2D" uid="uid://b0oeqsc0xksto" path="res://demo/assets/agent_junior_pieces.png" id="2_hnwhw"] -[ext_resource type="BehaviorTree" uid="uid://cb0ybf24ahnc3" path="res://demo/ai/tutorial_trees/tutorial_03_types.tres" id="3_a31ka"] +[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" diff --git a/demo/demo/agents/tutorial/tutorial_04_sequence.tscn b/demo/demo/agents/tutorial/tutorial_04_sequence.tscn index e8059c7..1044444 100644 --- a/demo/demo/agents/tutorial/tutorial_04_sequence.tscn +++ b/demo/demo/agents/tutorial/tutorial_04_sequence.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://ooigbfhfy4wa" path="res://demo/agents/agent_base.tscn" id="1_oibr1"] [ext_resource type="Texture2D" uid="uid://b0oeqsc0xksto" path="res://demo/assets/agent_junior_pieces.png" id="2_j52yc"] -[ext_resource type="BehaviorTree" uid="uid://dln8ywvtqedt7" path="res://demo/ai/tutorial_trees/tutorial_04_sequence.tres" id="3_feewj"] +[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" diff --git a/demo/demo/agents/tutorial/tutorial_05_selector.tscn b/demo/demo/agents/tutorial/tutorial_05_selector.tscn index 7f4f799..ee63224 100644 --- a/demo/demo/agents/tutorial/tutorial_05_selector.tscn +++ b/demo/demo/agents/tutorial/tutorial_05_selector.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://ooigbfhfy4wa" path="res://demo/agents/agent_base.tscn" id="1_62fs7"] [ext_resource type="Texture2D" uid="uid://b0oeqsc0xksto" path="res://demo/assets/agent_junior_pieces.png" id="2_gdg2c"] -[ext_resource type="BehaviorTree" uid="uid://bf4r652fv5kwi" path="res://demo/ai/tutorial_trees/tutorial_05_selector.tres" id="3_pm5ep"] +[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" diff --git a/demo/demo/agents/tutorial/tutorial_06_decorators.tscn b/demo/demo/agents/tutorial/tutorial_06_decorators.tscn index b934f78..a6f4a83 100644 --- a/demo/demo/agents/tutorial/tutorial_06_decorators.tscn +++ b/demo/demo/agents/tutorial/tutorial_06_decorators.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://ooigbfhfy4wa" path="res://demo/agents/agent_base.tscn" id="1_mbrnd"] [ext_resource type="Texture2D" uid="uid://b0oeqsc0xksto" path="res://demo/assets/agent_junior_pieces.png" id="2_ttkri"] -[ext_resource type="BehaviorTree" uid="uid://beiki511huxb8" path="res://demo/ai/tutorial_trees/tutorial_06_decorators.tres" id="3_tpgll"] +[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" diff --git a/demo/demo/agents/tutorial/tutorial_07_more_decorators.tscn b/demo/demo/agents/tutorial/tutorial_07_more_decorators.tscn index 354f8be..943a8b2 100644 --- a/demo/demo/agents/tutorial/tutorial_07_more_decorators.tscn +++ b/demo/demo/agents/tutorial/tutorial_07_more_decorators.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://ooigbfhfy4wa" path="res://demo/agents/agent_base.tscn" id="1_k4qfc"] [ext_resource type="Texture2D" uid="uid://b0oeqsc0xksto" path="res://demo/assets/agent_junior_pieces.png" id="2_q4r1n"] -[ext_resource type="BehaviorTree" uid="uid://tep50j4d6kgp" path="res://demo/ai/tutorial_trees/tutorial_07_more_decorators.tres" id="3_ta3g6"] +[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" diff --git a/demo/demo/agents/tutorial/tutorial_08_final_touch.tscn b/demo/demo/agents/tutorial/tutorial_08_final_touch.tscn index 0817df7..7bae088 100644 --- a/demo/demo/agents/tutorial/tutorial_08_final_touch.tscn +++ b/demo/demo/agents/tutorial/tutorial_08_final_touch.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://ooigbfhfy4wa" path="res://demo/agents/agent_base.tscn" id="1_bjdsc"] [ext_resource type="Texture2D" uid="uid://b0oeqsc0xksto" path="res://demo/assets/agent_junior_pieces.png" id="2_onjfd"] -[ext_resource type="BehaviorTree" uid="uid://dp0cglcytwcj5" path="res://demo/ai/tutorial_trees/tutorial_08_final_touch.tres" id="3_c5qx4"] +[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" diff --git a/demo/demo/ai/tasks/arrive_pos.gd b/demo/demo/ai/tasks/arrive_pos.gd index 0cd016c..0c266cb 100644 --- a/demo/demo/ai/tasks/arrive_pos.gd +++ b/demo/demo/ai/tasks/arrive_pos.gd @@ -15,17 +15,17 @@ extends BTAction ## otherwise returns RUNNING. ## Blackboard variable that stores the target position (Vector2) -@export var target_position_var := "pos" +@export var target_position_var := &"pos" ## Variable that stores desired speed (float) -@export var speed_var := "speed" +@export var speed_var := &"speed" ## How close should the agent be to the target position to return SUCCESS. @export var tolerance := 50.0 ## Specifies the node to avoid (valid Node2D is expected). ## If not empty, agent will circle around the node while moving into position. -@export var avoid_var: String +@export var avoid_var: StringName func _generate_name() -> String: diff --git a/demo/demo/ai/tasks/back_away.gd b/demo/demo/ai/tasks/back_away.gd index d0d1a08..1bab356 100644 --- a/demo/demo/ai/tasks/back_away.gd +++ b/demo/demo/ai/tasks/back_away.gd @@ -14,7 +14,7 @@ extends BTAction ## Returns RUNNING always. ## Blackboard variable that stores desired speed. -@export var speed_var: String = "speed" +@export var speed_var: StringName = &"speed" ## How much can we deviate from the "away" direction (in radians). @export var max_angle_deviation: float = 0.7 diff --git a/demo/demo/ai/tasks/face_target.gd b/demo/demo/ai/tasks/face_target.gd index a1f69a2..86551b8 100644 --- a/demo/demo/ai/tasks/face_target.gd +++ b/demo/demo/ai/tasks/face_target.gd @@ -14,7 +14,7 @@ extends BTAction ## Returns FAILURE if target is not a valid Node2D instance. ## Blackboard variable that stores our target (expecting Node2D). -@export var target_var: String = "target" +@export var target_var: StringName = &"target" # Display a customized name (requires @tool). func _generate_name() -> String: diff --git a/demo/demo/ai/tasks/get_first_in_group.gd b/demo/demo/ai/tasks/get_first_in_group.gd index d4e17bc..6d2ed59 100644 --- a/demo/demo/ai/tasks/get_first_in_group.gd +++ b/demo/demo/ai/tasks/get_first_in_group.gd @@ -17,7 +17,7 @@ extends BTAction @export var group: StringName ## Blackboard variable in which the task will store the acquired node. -@export var output_var: String = "target" +@export var output_var: StringName = &"target" func _generate_name() -> String: diff --git a/demo/demo/ai/tasks/in_range.gd b/demo/demo/ai/tasks/in_range.gd index 0a9f106..c6a6a30 100644 --- a/demo/demo/ai/tasks/in_range.gd +++ b/demo/demo/ai/tasks/in_range.gd @@ -23,7 +23,7 @@ extends BTCondition @export var distance_max: float ## Blackboard variable that holds the target (expecting Node2D). -@export var target_var := "target" +@export var target_var: StringName = &"target" var _min_distance_squared: float var _max_distance_squared: float diff --git a/demo/demo/ai/tasks/is_aligned_with_target.gd b/demo/demo/ai/tasks/is_aligned_with_target.gd index c8c4e3d..8bbbcf5 100644 --- a/demo/demo/ai/tasks/is_aligned_with_target.gd +++ b/demo/demo/ai/tasks/is_aligned_with_target.gd @@ -15,7 +15,7 @@ extends BTCondition ## Returns FAILURE if not aligned or if target is not a valid node instance. -@export var target_var: String = "target" +@export var target_var: StringName = &"target" @export var tolerance: float = 30.0 diff --git a/demo/demo/ai/tasks/move_forward.gd b/demo/demo/ai/tasks/move_forward.gd index fe923cc..47c8a65 100644 --- a/demo/demo/ai/tasks/move_forward.gd +++ b/demo/demo/ai/tasks/move_forward.gd @@ -15,7 +15,7 @@ extends BTAction ## Returns RUNNING if elapsed time didn't exceed duration. ## Blackboard variable that stores desired speed. -@export var speed_var: String = "speed" +@export var speed_var: StringName = &"speed" ## How long to perform this task (in seconds). @export var duration: float = 0.1 diff --git a/demo/demo/ai/tasks/pursue.gd b/demo/demo/ai/tasks/pursue.gd index ac050d5..d3062ae 100644 --- a/demo/demo/ai/tasks/pursue.gd +++ b/demo/demo/ai/tasks/pursue.gd @@ -20,10 +20,10 @@ extends BTAction const TOLERANCE := 30.0 ## Blackboard variable that stores our target (expecting Node2D). -@export var target_var: String = "target" +@export var target_var: StringName = &"target" ## Blackboard variable that stores desired speed. -@export var speed_var: String = "speed" +@export var speed_var: StringName = &"speed" ## Desired distance from target. @export var approach_distance: float = 100.0 diff --git a/demo/demo/ai/tasks/select_flanking_pos.gd b/demo/demo/ai/tasks/select_flanking_pos.gd index 204fe68..1f54871 100644 --- a/demo/demo/ai/tasks/select_flanking_pos.gd +++ b/demo/demo/ai/tasks/select_flanking_pos.gd @@ -21,7 +21,7 @@ enum AgentSide { } ## Blackboard variable that holds current target (should be a Node2D instance). -@export var target_var: String = "target" +@export var target_var: StringName = &"target" ## Which agent's side should we flank? @export var flank_side: AgentSide = AgentSide.CLOSEST @@ -33,7 +33,7 @@ enum AgentSide { @export var range_max: int = 400 ## Blackboard variable that will be used to store selected position. -@export var position_var: String = "pos" +@export var position_var: StringName = &"pos" # Display a customized name (requires @tool). diff --git a/demo/demo/ai/tasks/select_random_nearby_pos.gd b/demo/demo/ai/tasks/select_random_nearby_pos.gd index 8dd792c..0b0e38f 100644 --- a/demo/demo/ai/tasks/select_random_nearby_pos.gd +++ b/demo/demo/ai/tasks/select_random_nearby_pos.gd @@ -10,7 +10,7 @@ extends BTAction @export var range_max: float = 500.0 ## Blackboard variable that will be used to store the desired position. -@export var position_var: String = "pos" +@export var position_var: StringName = &"pos" # Display a customized name (requires @tool). diff --git a/demo/demo/ai/trees/01_agent_melee_simple.tres b/demo/demo/ai/trees/01_agent_melee_simple.tres index 92a1242..b4430f6 100644 --- a/demo/demo/ai/trees/01_agent_melee_simple.tres +++ b/demo/demo/ai/trees/01_agent_melee_simple.tres @@ -40,12 +40,12 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_ulbrf"] script = ExtResource("1_2jpsu") group = &"player" -output_var = "target" +output_var = &"target" [sub_resource type="BTAction" id="BTAction_a4jqi"] script = ExtResource("2_h5db5") -target_var = "target" -speed_var = "speed" +target_var = &"target" +speed_var = &"speed" approach_distance = 100.0 [sub_resource type="BTTimeLimit" id="BTTimeLimit_xek5v"] @@ -58,7 +58,7 @@ children = [SubResource("BTPlayAnimation_olf37"), SubResource("BTAction_ulbrf"), [sub_resource type="BTAction" id="BTAction_kidxn"] script = ExtResource("3_bpmfp") -target_var = "target" +target_var = &"target" [sub_resource type="BTWait" id="BTWait_tadkc"] duration = 0.1 diff --git a/demo/demo/ai/trees/02_agent_charger.tres b/demo/demo/ai/trees/02_agent_charger.tres index 19a8b96..85e2534 100644 --- a/demo/demo/ai/trees/02_agent_charger.tres +++ b/demo/demo/ai/trees/02_agent_charger.tres @@ -37,15 +37,15 @@ children = [SubResource("BTPlayAnimation_ha2ag"), SubResource("BTRandomWait_cedq [sub_resource type="BTAction" id="BTAction_pp23y"] script = ExtResource("1_657p6") group = &"player" -output_var = "target" +output_var = &"target" [sub_resource type="BTAction" id="BTAction_pmvd0"] script = ExtResource("2_t3udh") -target_var = "target" +target_var = &"target" flank_side = 0 range_min = 500 range_max = 600 -position_var = "flank_pos" +position_var = &"flank_pos" [sub_resource type="BBNode" id="BBNode_xh3wr"] resource_name = "AnimationPlayer" @@ -58,10 +58,10 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_87mi0"] script = ExtResource("3_u2ra5") -target_position_var = "flank_pos" -speed_var = "speed" +target_position_var = &"flank_pos" +speed_var = &"speed" tolerance = 50.0 -avoid_var = "" +avoid_var = &"" [sub_resource type="BTTimeLimit" id="BTTimeLimit_is5ag"] children = [SubResource("BTAction_87mi0")] @@ -73,7 +73,7 @@ children = [SubResource("BTAction_pp23y"), SubResource("BTAction_pmvd0"), SubRes [sub_resource type="BTAction" id="BTAction_q5g4a"] script = ExtResource("4_xwjl7") -target_var = "target" +target_var = &"target" [sub_resource type="BBNode" id="BBNode_bfijg"] resource_name = "AnimationPlayer" @@ -103,7 +103,7 @@ blend = 0.05 [sub_resource type="BTAction" id="BTAction_o18uk"] script = ExtResource("5_ucvak") -speed_var = "charge_speed" +speed_var = &"charge_speed" duration = 1.5 [sub_resource type="BTSequence" id="BTSequence_8lur1"] diff --git a/demo/demo/ai/trees/03_agent_imp.tres b/demo/demo/ai/trees/03_agent_imp.tres index 1c28464..b56832a 100644 --- a/demo/demo/ai/trees/03_agent_imp.tres +++ b/demo/demo/ai/trees/03_agent_imp.tres @@ -26,14 +26,14 @@ blend = 0.1 script = ExtResource("1_cdtqu") range_min = 200.0 range_max = 500.0 -position_var = "pos" +position_var = &"pos" [sub_resource type="BTAction" id="BTAction_5kivl"] script = ExtResource("2_31fsn") -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_k184c"] custom_name = "Chaotic Walk" @@ -71,12 +71,12 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_ulbrf"] script = ExtResource("3_y1r1a") group = &"player" -output_var = "target" +output_var = &"target" [sub_resource type="BTAction" id="BTAction_a4jqi"] script = ExtResource("4_jlgat") -target_var = "target" -speed_var = "speed" +target_var = &"target" +speed_var = &"speed" approach_distance = 100.0 [sub_resource type="BTTimeLimit" id="BTTimeLimit_xek5v"] @@ -89,7 +89,7 @@ children = [SubResource("BTPlayAnimation_olf37"), SubResource("BTAction_ulbrf"), [sub_resource type="BTAction" id="BTAction_kidxn"] script = ExtResource("5_o4ggh") -target_var = "target" +target_var = &"target" [sub_resource type="BTWait" id="BTWait_tadkc"] duration = 0.1 diff --git a/demo/demo/ai/trees/04_agent_skirmisher.tres b/demo/demo/ai/trees/04_agent_skirmisher.tres index 921b62c..49af249 100644 --- a/demo/demo/ai/trees/04_agent_skirmisher.tres +++ b/demo/demo/ai/trees/04_agent_skirmisher.tres @@ -28,7 +28,7 @@ var/slow_speed/hint_string = "10,1000,10" [sub_resource type="BTAction" id="BTAction_ulbrf"] script = ExtResource("1_2883n") group = &"player" -output_var = "target" +output_var = &"target" [sub_resource type="BBNode" id="BBNode_nrd4b"] resource_name = "AnimationPlayer" @@ -54,7 +54,7 @@ children = [SubResource("BTSequence_yhjh1")] script = ExtResource("5_p5dih") distance_min = 0.0 distance_max = 300.0 -target_var = "target" +target_var = &"target" [sub_resource type="BBNode" id="BBNode_7c0g0"] resource_name = "AnimationPlayer" @@ -68,8 +68,8 @@ speed = 1.2 [sub_resource type="BTAction" id="BTAction_jryg6"] script = ExtResource("2_lpckh") -target_var = "target" -speed_var = "speed" +target_var = &"target" +speed_var = &"speed" approach_distance = 100.0 [sub_resource type="BTTimeLimit" id="BTTimeLimit_lkphr"] @@ -78,7 +78,7 @@ time_limit = 1.0 [sub_resource type="BTAction" id="BTAction_kidxn"] script = ExtResource("4_57x51") -target_var = "target" +target_var = &"target" [sub_resource type="BTWait" id="BTWait_tadkc"] duration = 0.2 @@ -107,7 +107,7 @@ duration = 2.0 script = ExtResource("5_p5dih") distance_min = 0.0 distance_max = 300.0 -target_var = "target" +target_var = &"target" [sub_resource type="BBNode" id="BBNode_3iqcf"] resource_name = "AnimationPlayer" @@ -121,7 +121,7 @@ speed = -0.7 [sub_resource type="BTAction" id="BTAction_4ye2y"] script = ExtResource("6_fkv0k") -speed_var = "slow_speed" +speed_var = &"slow_speed" max_angle_deviation = 0.7 [sub_resource type="BTTimeLimit" id="BTTimeLimit_cns1i"] @@ -158,18 +158,18 @@ speed = 1.2 [sub_resource type="BTAction" id="BTAction_g5ayy"] script = ExtResource("2_cjso2") -target_var = "target" +target_var = &"target" flank_side = 2 range_min = 90 range_max = 90 -position_var = "flank_pos" +position_var = &"flank_pos" [sub_resource type="BTAction" id="BTAction_tv4lt"] script = ExtResource("3_treio") -target_position_var = "flank_pos" -speed_var = "fast_speed" +target_position_var = &"flank_pos" +speed_var = &"fast_speed" tolerance = 50.0 -avoid_var = "target" +avoid_var = &"target" [sub_resource type="BTTimeLimit" id="BTTimeLimit_xek5v"] children = [SubResource("BTAction_tv4lt")] diff --git a/demo/demo/ai/trees/05_agent_ranged.tres b/demo/demo/ai/trees/05_agent_ranged.tres index 97bcc98..a17d9ab 100644 --- a/demo/demo/ai/trees/05_agent_ranged.tres +++ b/demo/demo/ai/trees/05_agent_ranged.tres @@ -34,7 +34,7 @@ max_duration = 1.5 [sub_resource type="BTAction" id="BTAction_c4cxo"] script = ExtResource("1_4xk1i") group = &"player" -output_var = "target" +output_var = &"target" [sub_resource type="BTSequence" id="BTSequence_yhjh1"] custom_name = "Take a break" @@ -52,18 +52,18 @@ speed = 1.5 [sub_resource type="BTAction" id="BTAction_op6l6"] script = ExtResource("4_53hao") -target_var = "target" +target_var = &"target" flank_side = 1 range_min = 400 range_max = 1000 -position_var = "pos" +position_var = &"pos" [sub_resource type="BTAction" id="BTAction_ycjun"] script = ExtResource("3_q4r2p") -target_position_var = "pos" -speed_var = "run_speed" +target_position_var = &"pos" +speed_var = &"run_speed" tolerance = 50.0 -avoid_var = "target" +avoid_var = &"target" [sub_resource type="BTTimeLimit" id="BTTimeLimit_gadc6"] children = [SubResource("BTAction_ycjun")] @@ -71,7 +71,7 @@ time_limit = 7.0 [sub_resource type="BTAction" id="BTAction_poqpu"] script = ExtResource("5_aexyq") -target_var = "target" +target_var = &"target" [sub_resource type="BTSequence" id="BTSequence_0gdqn"] custom_name = "Change flank" @@ -87,11 +87,11 @@ run_chance = 0.3 [sub_resource type="BTAction" id="BTAction_kuuw2"] script = ExtResource("4_53hao") -target_var = "target" +target_var = &"target" flank_side = 0 range_min = 400 range_max = 1000 -position_var = "shoot_pos" +position_var = &"shoot_pos" [sub_resource type="BBNode" id="BBNode_kc64r"] resource_name = "AnimationPlayer" @@ -104,21 +104,21 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_66hsk"] script = ExtResource("3_q4r2p") -target_position_var = "shoot_pos" -speed_var = "speed" +target_position_var = &"shoot_pos" +speed_var = &"speed" tolerance = 50.0 -avoid_var = "" +avoid_var = &"" [sub_resource type="BTTimeLimit" id="BTTimeLimit_24ath"] children = [SubResource("BTAction_66hsk")] [sub_resource type="BTAction" id="BTAction_enw2m"] script = ExtResource("5_aexyq") -target_var = "target" +target_var = &"target" [sub_resource type="BTCondition" id="BTCondition_1fnyc"] script = ExtResource("2_a8qex") -target_var = "target" +target_var = &"target" tolerance = 150.0 [sub_resource type="BBNode" id="BBNode_s6vt4"] diff --git a/demo/demo/ai/trees/06_agent_melee_combo.tres b/demo/demo/ai/trees/06_agent_melee_combo.tres index a8312b3..9f7d5c5 100644 --- a/demo/demo/ai/trees/06_agent_melee_combo.tres +++ b/demo/demo/ai/trees/06_agent_melee_combo.tres @@ -34,7 +34,7 @@ max_duration = 1.5 [sub_resource type="BTAction" id="BTAction_ulbrf"] script = ExtResource("1_sf4l8") group = &"player" -output_var = "target" +output_var = &"target" [sub_resource type="BTSequence" id="BTSequence_yhjh1"] custom_name = "Pause before action" @@ -42,11 +42,11 @@ children = [SubResource("BTPlayAnimation_qiw21"), SubResource("BTRandomWait_xlud [sub_resource type="BTAction" id="BTAction_85keo"] script = ExtResource("2_5nwkp") -target_var = "target" +target_var = &"target" flank_side = 0 range_min = 300 range_max = 400 -position_var = "pos" +position_var = &"pos" [sub_resource type="BBNode" id="BBNode_wpj6d"] resource_name = "AnimationPlayer" @@ -59,10 +59,10 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_ygjnc"] script = ExtResource("3_3tom2") -target_position_var = "pos" -speed_var = "speed" +target_position_var = &"pos" +speed_var = &"speed" tolerance = 50.0 -avoid_var = "" +avoid_var = &"" [sub_resource type="BTTimeLimit" id="BTTimeLimit_xek5v"] children = [SubResource("BTAction_ygjnc")] @@ -73,7 +73,7 @@ children = [SubResource("BTAction_85keo"), SubResource("BTPlayAnimation_olf37"), [sub_resource type="BTAction" id="BTAction_kidxn"] script = ExtResource("4_hi228") -target_var = "target" +target_var = &"target" [sub_resource type="BBNode" id="BBNode_giv5l"] resource_name = "AnimationPlayer" @@ -98,7 +98,7 @@ animation_name = &"attack_1" [sub_resource type="BTAction" id="BTAction_u22bc"] script = ExtResource("5_au5yc") -speed_var = "charge_speed" +speed_var = &"charge_speed" duration = 0.1 [sub_resource type="BTParallel" id="BTParallel_ec2e3"] @@ -119,7 +119,7 @@ animation_name = &"attack_2" [sub_resource type="BTAction" id="BTAction_yuxl3"] script = ExtResource("5_au5yc") -speed_var = "charge_speed" +speed_var = &"charge_speed" duration = 0.1 [sub_resource type="BTParallel" id="BTParallel_thojy"] @@ -140,7 +140,7 @@ animation_name = &"attack_3" [sub_resource type="BTAction" id="BTAction_rwp18"] script = ExtResource("5_au5yc") -speed_var = "charge_speed" +speed_var = &"charge_speed" duration = 0.1 [sub_resource type="BTParallel" id="BTParallel_qmdfb"] diff --git a/demo/demo/ai/trees/07_agent_melee_nuanced.tres b/demo/demo/ai/trees/07_agent_melee_nuanced.tres index 50dfc82..58c7ddc 100644 --- a/demo/demo/ai/trees/07_agent_melee_nuanced.tres +++ b/demo/demo/ai/trees/07_agent_melee_nuanced.tres @@ -34,7 +34,7 @@ max_duration = 1.5 [sub_resource type="BTAction" id="BTAction_c4cxo"] script = ExtResource("1_08fik") group = &"player" -output_var = "target" +output_var = &"target" [sub_resource type="BTSequence" id="BTSequence_yhjh1"] custom_name = "Pause before action" @@ -52,25 +52,25 @@ speed = 1.5 [sub_resource type="BTAction" id="BTAction_6e48s"] script = ExtResource("2_te3yo") -target_var = "target" +target_var = &"target" flank_side = 1 range_min = 400 range_max = 600 -position_var = "flank_pos" +position_var = &"flank_pos" [sub_resource type="BTAction" id="BTAction_66hsk"] script = ExtResource("3_svwk8") -target_position_var = "flank_pos" -speed_var = "flank_speed" +target_position_var = &"flank_pos" +speed_var = &"flank_speed" tolerance = 50.0 -avoid_var = "target" +avoid_var = &"target" [sub_resource type="BTTimeLimit" id="BTTimeLimit_24ath"] children = [SubResource("BTAction_66hsk")] [sub_resource type="BTAction" id="BTAction_enw2m"] script = ExtResource("4_mvsyw") -target_var = "target" +target_var = &"target" [sub_resource type="BTSequence" id="BTSequence_lhg7f"] custom_name = "Flank player" @@ -93,8 +93,8 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_a4jqi"] script = ExtResource("5_r1ou0") -target_var = "target" -speed_var = "speed" +target_var = &"target" +speed_var = &"speed" approach_distance = 100.0 [sub_resource type="BTTimeLimit" id="BTTimeLimit_xek5v"] @@ -103,7 +103,7 @@ time_limit = 2.0 [sub_resource type="BTAction" id="BTAction_kidxn"] script = ExtResource("4_mvsyw") -target_var = "target" +target_var = &"target" [sub_resource type="BTWait" id="BTWait_tadkc"] duration = 0.1 @@ -136,11 +136,11 @@ metadata/_weight_ = 4.0 [sub_resource type="BTAction" id="BTAction_mf87t"] script = ExtResource("2_te3yo") -target_var = "target" +target_var = &"target" flank_side = 0 range_min = 350 range_max = 600 -position_var = "pos" +position_var = &"pos" [sub_resource type="BBNode" id="BBNode_cx111"] resource_name = "AnimationPlayer" @@ -153,10 +153,10 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_6nx58"] script = ExtResource("3_svwk8") -target_position_var = "pos" -speed_var = "speed" +target_position_var = &"pos" +speed_var = &"speed" tolerance = 50.0 -avoid_var = "" +avoid_var = &"" [sub_resource type="BTTimeLimit" id="BTTimeLimit_tidwl"] children = [SubResource("BTAction_6nx58")] @@ -164,7 +164,7 @@ time_limit = 3.0 [sub_resource type="BTAction" id="BTAction_8q20y"] script = ExtResource("4_mvsyw") -target_var = "target" +target_var = &"target" [sub_resource type="BBNode" id="BBNode_s6vt4"] resource_name = "AnimationPlayer" diff --git a/demo/demo/ai/trees/08_agent_demon.tres b/demo/demo/ai/trees/08_agent_demon.tres index 99a5597..3333fe8 100644 --- a/demo/demo/ai/trees/08_agent_demon.tres +++ b/demo/demo/ai/trees/08_agent_demon.tres @@ -38,17 +38,17 @@ trigger_on_failure = true [sub_resource type="BTAction" id="BTAction_ohfp7"] script = ExtResource("1_ce4la") group = &"player" -output_var = "target" +output_var = &"target" [sub_resource type="BTCondition" id="BTCondition_7a5nv"] script = ExtResource("2_atyuj") distance_min = 0.0 distance_max = 150.0 -target_var = "target" +target_var = &"target" [sub_resource type="BTAction" id="BTAction_ddvrs"] script = ExtResource("3_3mw7l") -target_var = "target" +target_var = &"target" [sub_resource type="BBNode" id="BBNode_c4nfu"] resource_name = "AnimationPlayer" @@ -72,11 +72,11 @@ children = [SubResource("BTAction_ohfp7"), SubResource("BTCondition_7a5nv"), Sub script = ExtResource("2_atyuj") distance_min = 0.0 distance_max = 300.0 -target_var = "target" +target_var = &"target" [sub_resource type="BTAction" id="BTAction_wpt7j"] script = ExtResource("3_3mw7l") -target_var = "target" +target_var = &"target" [sub_resource type="BBNode" id="BBNode_iv62h"] resource_name = "AnimationPlayer" @@ -90,7 +90,7 @@ speed = -1.0 [sub_resource type="BTAction" id="BTAction_h2efl"] script = ExtResource("4_6dr32") -speed_var = "speed" +speed_var = &"speed" max_angle_deviation = 0.7 [sub_resource type="BTTimeLimit" id="BTTimeLimit_wm5g2"] @@ -115,18 +115,18 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_4mmh0"] script = ExtResource("5_dho0d") -target_var = "target" +target_var = &"target" flank_side = 0 range_min = 300 range_max = 700 -position_var = "pos" +position_var = &"pos" [sub_resource type="BTAction" id="BTAction_vb5c3"] script = ExtResource("6_0pfsl") -target_position_var = "pos" -speed_var = "speed" +target_position_var = &"pos" +speed_var = &"speed" tolerance = 50.0 -avoid_var = "" +avoid_var = &"" [sub_resource type="BTTimeLimit" id="BTTimeLimit_jyks2"] children = [SubResource("BTAction_vb5c3")] @@ -136,7 +136,7 @@ custom_name = "Short break before action" [sub_resource type="BTAction" id="BTAction_fkevy"] script = ExtResource("3_3mw7l") -target_var = "target" +target_var = &"target" [sub_resource type="BBNode" id="BBNode_lh25u"] resource_name = "AnimationPlayer" diff --git a/demo/demo/ai/trees/09_agent_summoner.tres b/demo/demo/ai/trees/09_agent_summoner.tres index 39191e2..6ab0a17 100644 --- a/demo/demo/ai/trees/09_agent_summoner.tres +++ b/demo/demo/ai/trees/09_agent_summoner.tres @@ -72,7 +72,7 @@ duration = 0.5 script = ExtResource("1_sgn0p") range_min = 300.0 range_max = 500.0 -position_var = "minion_pos" +position_var = &"minion_pos" [sub_resource type="BBVariant" id="BBVariant_wfjwy"] resource_name = "$minion_pos" @@ -104,7 +104,7 @@ children = [SubResource("BTCheckAgentProperty_olmdj"), SubResource("BTCheckVar_h script = ExtResource("1_sgn0p") range_min = 300.0 range_max = 700.0 -position_var = "pos" +position_var = &"pos" [sub_resource type="BBNode" id="BBNode_w5fh2"] resource_name = "AnimationPlayer" @@ -117,10 +117,10 @@ blend = 0.1 [sub_resource type="BTAction" id="BTAction_dfifw"] script = ExtResource("2_pshl2") -target_position_var = "pos" -speed_var = "speed" +target_position_var = &"pos" +speed_var = &"speed" tolerance = 50.0 -avoid_var = "" +avoid_var = &"" [sub_resource type="BTTimeLimit" id="BTTimeLimit_i05cm"] children = [SubResource("BTAction_dfifw")] diff --git a/demo/demo/ai/tutorial_trees/tutorial_01_welcome.tres b/demo/demo/ai/trees/tutorial/tutorial_01_welcome.tres similarity index 100% rename from demo/demo/ai/tutorial_trees/tutorial_01_welcome.tres rename to demo/demo/ai/trees/tutorial/tutorial_01_welcome.tres diff --git a/demo/demo/ai/tutorial_trees/tutorial_02_introduction.tres b/demo/demo/ai/trees/tutorial/tutorial_02_introduction.tres similarity index 100% rename from demo/demo/ai/tutorial_trees/tutorial_02_introduction.tres rename to demo/demo/ai/trees/tutorial/tutorial_02_introduction.tres diff --git a/demo/demo/ai/tutorial_trees/tutorial_03_types.tres b/demo/demo/ai/trees/tutorial/tutorial_03_types.tres similarity index 100% rename from demo/demo/ai/tutorial_trees/tutorial_03_types.tres rename to demo/demo/ai/trees/tutorial/tutorial_03_types.tres diff --git a/demo/demo/ai/tutorial_trees/tutorial_04_sequence.tres b/demo/demo/ai/trees/tutorial/tutorial_04_sequence.tres similarity index 100% rename from demo/demo/ai/tutorial_trees/tutorial_04_sequence.tres rename to demo/demo/ai/trees/tutorial/tutorial_04_sequence.tres diff --git a/demo/demo/ai/tutorial_trees/tutorial_05_selector.tres b/demo/demo/ai/trees/tutorial/tutorial_05_selector.tres similarity index 100% rename from demo/demo/ai/tutorial_trees/tutorial_05_selector.tres rename to demo/demo/ai/trees/tutorial/tutorial_05_selector.tres diff --git a/demo/demo/ai/tutorial_trees/tutorial_06_decorators.tres b/demo/demo/ai/trees/tutorial/tutorial_06_decorators.tres similarity index 100% rename from demo/demo/ai/tutorial_trees/tutorial_06_decorators.tres rename to demo/demo/ai/trees/tutorial/tutorial_06_decorators.tres diff --git a/demo/demo/ai/tutorial_trees/tutorial_07_more_decorators.tres b/demo/demo/ai/trees/tutorial/tutorial_07_more_decorators.tres similarity index 100% rename from demo/demo/ai/tutorial_trees/tutorial_07_more_decorators.tres rename to demo/demo/ai/trees/tutorial/tutorial_07_more_decorators.tres diff --git a/demo/demo/ai/tutorial_trees/tutorial_08_final_touch.tres b/demo/demo/ai/trees/tutorial/tutorial_08_final_touch.tres similarity index 100% rename from demo/demo/ai/tutorial_trees/tutorial_08_final_touch.tres rename to demo/demo/ai/trees/tutorial/tutorial_08_final_touch.tres diff --git a/demo/demo/scenes/showcase.tscn b/demo/demo/scenes/showcase.tscn index 0f22e83..5e7946a 100644 --- a/demo/demo/scenes/showcase.tscn +++ b/demo/demo/scenes/showcase.tscn @@ -257,8 +257,8 @@ anchor_right = 1.0 anchor_bottom = 1.0 offset_left = 4.0 offset_top = 4.0 -offset_right = 1020.0 -offset_bottom = 704.0 +offset_right = -4.0 +offset_bottom = -4.0 grow_horizontal = 2 grow_vertical = 2 gutters_draw_line_numbers = true