1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-25 01:24:23 +00:00
hella-farm/behaviours/ai_hunter_erratic.tscn

23 lines
1.1 KiB
Text

[gd_scene load_steps=4 format=3 uid="uid://cgq2jkbrw1y0o"]
[ext_resource type="PackedScene" uid="uid://ctpn4hvkhxoi3" path="res://behaviours/tracker_edible.tscn" id="1_h53ag"]
[ext_resource type="PackedScene" uid="uid://dti7l0d40hhgt" path="res://behaviours/target_picker.tscn" id="2_h4v3e"]
[ext_resource type="Script" path="res://behaviours/move_towards.gd" id="3_ucief"]
[node name="AIHunterErratic" type="Node2D"]
[node name="EdibleTracker" parent="." instance=ExtResource("1_h53ag")]
[node name="Timer" type="Timer" parent="."]
wait_time = 2.4
autostart = true
[node name="TargetPicker" parent="." node_paths=PackedStringArray("tracker") instance=ExtResource("2_h4v3e")]
tracker = NodePath("../EdibleTracker")
[node name="MoveTowards" type="Node2D" parent="."]
script = ExtResource("3_ucief")
[connection signal="untracked" from="EdibleTracker" to="TargetPicker" method="clear_if_target"]
[connection signal="timeout" from="Timer" to="TargetPicker" method="sample_target"]
[connection signal="target_changed" from="TargetPicker" to="MoveTowards" method="set_target" unbinds=1]