[gd_scene load_steps=28 format=3 uid="uid://dl1axae8yeeeh"] [ext_resource type="Script" path="res://scene/test/other_character.gd" id="1_6f8fy"] [ext_resource type="Texture2D" uid="uid://csk8u15wepd1w" path="res://icon.svg" id="2_tbr4x"] [ext_resource type="Script" path="res://addons/beehave/nodes/beehave_tree.gd" id="2_twyt5"] [ext_resource type="Script" path="res://addons/beehave/nodes/composites/selector.gd" id="3_0pv7j"] [ext_resource type="PackedScene" uid="uid://ldjrnwapxefe" path="res://scene/test/action_set_rand_pos.tscn" id="3_a6loo"] [ext_resource type="Script" path="res://addons/beehave/nodes/composites/sequence.gd" id="3_gehdk"] [ext_resource type="PackedScene" uid="uid://jkwn820drv43" path="res://scene/test/await_time.tscn" id="4_hl4be"] [ext_resource type="PackedScene" uid="uid://dg0gnl5n62gq6" path="res://scene/test/run_await.tscn" id="4_hydke"] [ext_resource type="PackedScene" uid="uid://hgsb64hg78m5" path="res://scene/test/condition_accuse.tscn" id="5_tomxt"] [ext_resource type="PackedScene" uid="uid://dukqa6ha8aeic" path="res://scene/test/condition_hungry.tscn" id="6_qkap5"] [ext_resource type="PackedScene" uid="uid://cm7nelq3tbye6" path="res://scene/test/action_move_to_unit.tscn" id="6_wkm0p"] [ext_resource type="PackedScene" uid="uid://b65amfq474sv7" path="res://scene/test/action_move_to_target.tscn" id="7_phvf1"] [ext_resource type="PackedScene" uid="uid://c3pouwk6mbovv" path="res://scene/test/action_accuse.tscn" id="7_wxwf6"] [ext_resource type="PackedScene" uid="uid://k7sldgn2joe0" path="res://scene/test/action_eat.tscn" id="8_xfqbv"] [ext_resource type="PackedScene" uid="uid://qrl0pc72e3q6" path="res://scene/test/condition_attack.tscn" id="10_85ndl"] [ext_resource type="PackedScene" uid="uid://bcr5oa32fvxwa" path="res://scene/test/action_attack.tscn" id="11_7tlfn"] [sub_resource type="CircleShape2D" id="CircleShape2D_s46hi"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_lphpm"] size = Vector2(121, 136) [sub_resource type="CircleShape2D" id="CircleShape2D_fp36j"] radius = 104.12 [sub_resource type="CircleShape2D" id="CircleShape2D_0d77h"] radius = 472.662 [sub_resource type="Animation" id="Animation_tov45"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("action_show:visible") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } [sub_resource type="Animation" id="Animation_8eva7"] resource_name = "show" length = 0.5 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("action_show:visible") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.1, 0.5), "transitions": PackedFloat32Array(1, 1, 1), "update": 1, "values": [false, true, false] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_a6wya"] _data = { "RESET": SubResource("Animation_tov45"), "show": SubResource("Animation_8eva7") } [sub_resource type="Gradient" id="Gradient_uhodq"] colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_ioncu"] gradient = SubResource("Gradient_uhodq") [sub_resource type="Gradient" id="Gradient_qd3pc"] colors = PackedColorArray(0, 1, 0, 1, 0, 1, 0, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_6t72h"] gradient = SubResource("Gradient_qd3pc") [node name="other_character" type="CharacterBody2D" node_paths=PackedStringArray("agent", "rotate", "touch_area", "sense_area", "attack_area")] script = ExtResource("1_6f8fy") agent = NodePath("agent") rotate = NodePath("rotate") touch_area = NodePath("touch_area") sense_area = NodePath("sense_area") attack_area = NodePath("rotate/attack_area") [node name="Sprite2D" type="Sprite2D" parent="."] visible = false texture = ExtResource("2_tbr4x") [node name="agent" type="NavigationAgent2D" parent="."] path_postprocessing = 1 avoidance_enabled = true radius = 20.0 debug_enabled = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_s46hi") [node name="rotate" type="Node2D" parent="."] [node name="attack_area" type="Area2D" parent="rotate"] [node name="CollisionShape2D" type="CollisionShape2D" parent="rotate/attack_area"] position = Vector2(60.5, 3) shape = SubResource("RectangleShape2D_lphpm") [node name="BeehaveTree" type="Node" parent="." node_paths=PackedStringArray("blackboard", "actor")] script = ExtResource("2_twyt5") blackboard = NodePath("@Node@113329") actor = NodePath("..") [node name="SelectorComposite" type="Node" parent="BeehaveTree"] script = ExtResource("3_0pv7j") [node name="eat" type="Node" parent="BeehaveTree/SelectorComposite"] script = ExtResource("3_gehdk") [node name="condition_hungry" parent="BeehaveTree/SelectorComposite/eat" instance=ExtResource("6_qkap5")] [node name="action_move_to_target" parent="BeehaveTree/SelectorComposite/eat" instance=ExtResource("7_phvf1")] [node name="action_eat" parent="BeehaveTree/SelectorComposite/eat" instance=ExtResource("8_xfqbv")] [node name="accuse" type="Node" parent="BeehaveTree/SelectorComposite"] script = ExtResource("3_gehdk") [node name="condition_accuse" parent="BeehaveTree/SelectorComposite/accuse" instance=ExtResource("5_tomxt")] [node name="action_move_to_unit" parent="BeehaveTree/SelectorComposite/accuse" instance=ExtResource("6_wkm0p")] [node name="action_accuse" parent="BeehaveTree/SelectorComposite/accuse" instance=ExtResource("7_wxwf6")] [node name="await_time" parent="BeehaveTree/SelectorComposite/accuse" instance=ExtResource("4_hl4be")] await_time = 2.0 [node name="attack" type="Node" parent="BeehaveTree/SelectorComposite"] script = ExtResource("3_gehdk") [node name="condition_attack" parent="BeehaveTree/SelectorComposite/attack" instance=ExtResource("10_85ndl")] [node name="action_move_to_unit" parent="BeehaveTree/SelectorComposite/attack" instance=ExtResource("6_wkm0p")] [node name="action_attack" parent="BeehaveTree/SelectorComposite/attack" instance=ExtResource("11_7tlfn")] [node name="await_time" parent="BeehaveTree/SelectorComposite/attack" instance=ExtResource("4_hl4be")] await_time = 1.0 [node name="rand_walk" type="Node" parent="BeehaveTree/SelectorComposite"] script = ExtResource("3_gehdk") [node name="await_time" parent="BeehaveTree/SelectorComposite/rand_walk" instance=ExtResource("4_hl4be")] await_time = 2.0 [node name="action_set_rand_pos" parent="BeehaveTree/SelectorComposite/rand_walk" instance=ExtResource("3_a6loo")] [node name="run_await" parent="BeehaveTree/SelectorComposite/rand_walk" instance=ExtResource("4_hydke")] [node name="touch_area" type="Area2D" parent="."] unique_name_in_owner = true [node name="CollisionShape2D" type="CollisionShape2D" parent="touch_area"] shape = SubResource("CircleShape2D_fp36j") [node name="sense_area" type="Area2D" parent="."] unique_name_in_owner = true [node name="CollisionShape2D" type="CollisionShape2D" parent="sense_area"] shape = SubResource("CircleShape2D_0d77h") [node name="action_show" type="Label" parent="."] unique_name_in_owner = true visible = false z_index = 1 offset_left = -40.0 offset_top = -75.0 offset_right = 39.0 offset_bottom = -6.0 theme_override_font_sizes/font_size = 50 text = "🤬" horizontal_alignment = 1 vertical_alignment = 1 [node name="action_animation" type="AnimationPlayer" parent="."] unique_name_in_owner = true libraries = { "": SubResource("AnimationLibrary_a6wya") } [node name="hungry" type="Label" parent="."] unique_name_in_owner = true offset_left = -56.0 offset_top = -179.0 offset_right = 48.0 offset_bottom = -96.0 theme_override_colors/font_color = Color(0, 0, 0, 1) theme_override_font_sizes/font_size = 20 horizontal_alignment = 1 vertical_alignment = 1 [node name="hp" type="TextureProgressBar" parent="."] unique_name_in_owner = true modulate = Color(1, 1, 1, 0.607843) offset_left = -128.0 offset_top = -192.0 offset_right = 128.0 offset_bottom = -152.0 nine_patch_stretch = true texture_under = SubResource("GradientTexture1D_ioncu") texture_progress = SubResource("GradientTexture1D_6t72h") [connection signal="state_value_changed" from="." to="." method="_on_state_value_changed"] [connection signal="body_entered" from="sense_area" to="." method="_on_sense_area_body_entered"]