Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map editor update: Remove size controls, rectangle select, map rotation #55

Merged
merged 138 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
ec266db
Start loading files into editor
snipercup Nov 21, 2023
e9f5cc4
Add navigation from main menu
snipercup Nov 22, 2023
b2df2a1
Now able to create a new json file
snipercup Nov 22, 2023
b24fd03
More work on loading mapfiles
snipercup Nov 23, 2023
50f510d
Can now save and load maps in editor
snipercup Nov 23, 2023
cf5743a
Load custom levels into main menu
snipercup Nov 23, 2023
0676fe3
Fix scaling issue
snipercup Nov 23, 2023
4d92eea
Fix no scroll bug
snipercup Nov 24, 2023
94de13f
Added terraintile editor
snipercup Nov 24, 2023
a869594
Tile saving and loading works
snipercup Nov 25, 2023
5d62db0
Improved tile editor
snipercup Nov 25, 2023
cb77aed
Contenteditor adjusted sizing, tab control
snipercup Nov 26, 2023
306b9f8
Added categories to map editor
snipercup Nov 27, 2023
af4e1f2
Polishing
snipercup Nov 28, 2023
eebe6d3
Remove comments
snipercup Nov 28, 2023
9b7c849
Starting POC
snipercup Nov 28, 2023
d5836a2
Infinite panning now possible
snipercup Nov 29, 2023
16d4ad9
Now it's seamless
snipercup Nov 30, 2023
32e402a
Cleanup overmap script
snipercup Nov 30, 2023
9c1cfa0
Refactor file names json function
snipercup Dec 2, 2023
8e2f9d1
Switch level from overmap
snipercup Dec 3, 2023
866b2c4
Can switch levels in-game
snipercup Dec 3, 2023
a6e0691
Add gui elements to overmap
snipercup Dec 3, 2023
c513d77
Create gamedata singleton
snipercup Dec 3, 2023
2b11e38
Refactor some json loading
snipercup Dec 3, 2023
adf11f5
overmap is consistent
snipercup Dec 5, 2023
6ae5f43
Initial version of save load
snipercup Dec 5, 2023
3c6e92d
remove editor complaints
snipercup Dec 6, 2023
e2f8601
Added the selectable sprite custom widget
snipercup Dec 8, 2023
a459a66
Add mobeditor, refactor contentlist
snipercup Dec 10, 2023
01105d6
layout, bugfix
snipercup Dec 10, 2023
eb98a0a
small refactor of adding json items
snipercup Dec 10, 2023
143a3ba
Initial version of mob editor
snipercup Dec 10, 2023
e5632c0
fix map editor bug when creating new map
snipercup Dec 10, 2023
1f37269
Refactor editor data management
snipercup Dec 13, 2023
1592220
Update tiles.json to use sprite name
snipercup Dec 14, 2023
4d917aa
reintroduce slopes
snipercup Dec 15, 2023
f6925bb
Update markdownlabel
snipercup Dec 16, 2023
9bb4615
Limit input rect on tilegrid
snipercup Dec 16, 2023
cc6c8fb
Limit painting only to when drawing
snipercup Dec 16, 2023
e092de2
Add icons to replace text
snipercup Dec 17, 2023
f299775
Add brush preview
snipercup Dec 17, 2023
ae0cab2
Add rotation to mapeditor
snipercup Dec 17, 2023
5101f44
Tiles rotate in game
snipercup Dec 22, 2023
d7efa12
Add folder colors
snipercup Dec 22, 2023
667dfbc
Make another scripts folder green
snipercup Dec 22, 2023
89f1d20
Move sprites and scenes to defaults
snipercup Dec 23, 2023
fc8c2cb
remove extra scenes and sprites
snipercup Dec 23, 2023
2370da9
Moved the enemy corpse to defaults
snipercup Dec 23, 2023
3a90db2
Adjusted scenes to new paths
snipercup Dec 23, 2023
5bc423d
Remove extra tiles
snipercup Dec 23, 2023
35729f4
Remove extra sprites too
snipercup Dec 23, 2023
2c30049
Mapeditor allow mob painting
snipercup Dec 23, 2023
1eceb0f
Update scrapwalker64.png
snipercup Dec 23, 2023
f165150
Mob spawns on the block
snipercup Jan 2, 2024
e8f0c0b
Mob now has transparancy
snipercup Jan 4, 2024
d894cbf
remove commented code
snipercup Jan 4, 2024
4e49632
fix block save load
snipercup Jan 7, 2024
cd36a24
rename enemy to mob
snipercup Jan 7, 2024
6c7b0b7
Save and load mob and block rotation
snipercup Jan 7, 2024
9e84a84
Fix save initialization
snipercup Jan 8, 2024
653c517
Fix overmap coordinates
snipercup Jan 8, 2024
f337849
Rename level select to load game
snipercup Jan 9, 2024
c68672d
Change the load maps function
snipercup Jan 9, 2024
b745a2e
Add load game function
snipercup Jan 9, 2024
faab876
Initial load game implementation
snipercup Jan 9, 2024
517e484
Save the overmap too
snipercup Jan 9, 2024
b17d361
Properly save overmap
snipercup Jan 10, 2024
b107e5f
Return load game function
snipercup Jan 10, 2024
e89e5d5
Preserve player inventory between maps
snipercup Jan 12, 2024
f0ba3d5
Preserve player inventory across saves
snipercup Jan 12, 2024
8263876
Enemy corpse loot is saved and loaded
snipercup Jan 12, 2024
cde03db
Save and load player health and death
snipercup Jan 12, 2024
5c85c8f
add furniture sprites
snipercup Jan 13, 2024
2165638
Minor fix on existing widgets
snipercup Jan 13, 2024
04a5ba5
Initial furniture editor
snipercup Jan 13, 2024
2faa884
Finalize furniture editor
snipercup Jan 13, 2024
ba5a692
Paint furniture in map editur
snipercup Jan 13, 2024
9b3c2ce
add furniture to game
snipercup Jan 14, 2024
48f21e9
Basic physics for furniture
snipercup Jan 14, 2024
5a4326d
Adjust layers
snipercup Jan 15, 2024
d45d812
Save and load furniture
snipercup Jan 15, 2024
6222bbf
Create map icons
snipercup Jan 15, 2024
e1848e7
fix mapeditor bugs
snipercup Jan 15, 2024
ed88095
Initial tactical map editor
snipercup Jan 15, 2024
a2233d9
Adding tacticalmap infrastructure
snipercup Jan 15, 2024
4cee329
Tactical map editor can write file
snipercup Jan 16, 2024
7f8e3d9
Tacticalmap loads ingame
snipercup Jan 16, 2024
b72e4b0
Tactical maps are saved and loaded
snipercup Jan 16, 2024
3381a2f
fix tileeditor bugs
snipercup Jan 16, 2024
ce4c6b5
Add tiles, enable tab navigation
snipercup Jan 16, 2024
ede35fa
snow and toxic waste tiles
snipercup Jan 16, 2024
73470e7
More tiles, kitchen, rock
snipercup Jan 16, 2024
cb53e17
Delete old tiles, add new ones
snipercup Jan 17, 2024
486853d
Add the last tiles
snipercup Jan 17, 2024
6f9f374
Mob looks at target
snipercup Jan 17, 2024
d5d2435
Mobs spawn with stats
snipercup Jan 17, 2024
637e503
Save load mobs, add rust sentinel
snipercup Jan 17, 2024
4b12ee8
Mobs get unique meshes
snipercup Jan 17, 2024
ff7eea0
Furniture above player invisible, fix bug
snipercup Jan 18, 2024
a77e991
Add static furniture node and load and save
snipercup Jan 18, 2024
8f3536e
Furniture rotation, not working yet
snipercup Jan 18, 2024
b401d21
Fix tacticalmap editor bug
snipercup Jan 19, 2024
1becb66
Rotate furniture, loading not working yet
snipercup Jan 19, 2024
e261156
Rotation is saved and loaded properly
snipercup Jan 20, 2024
21e2fe1
proper furniture save load rotation
snipercup Jan 20, 2024
b702eaf
Remove commented out code
snipercup Jan 20, 2024
6e5cbeb
Initial item editor, sprites
snipercup Jan 21, 2024
6b4a6ca
First item created
snipercup Jan 21, 2024
4d816d0
Add height width stack properties
snipercup Jan 21, 2024
657e978
Add current items
snipercup Jan 21, 2024
53c2a9b
Items are loaded from json data
snipercup Jan 21, 2024
3066dbe
Basic inventory window
snipercup Jan 21, 2024
d92cb17
Inventory window basic functionality
snipercup Jan 21, 2024
a4bf510
Dynamic list of containers in proximity, inventory window
snipercup Jan 22, 2024
61c24b9
Update gloot
snipercup Jan 23, 2024
1a06644
Add some tabs to the item editor
snipercup Jan 23, 2024
160ec24
Add pistol and rifle json in item editor
snipercup Jan 23, 2024
b3880ec
Magazine and bullet json
snipercup Jan 23, 2024
b1ecc20
Weapon can be equipped
snipercup Jan 24, 2024
66da0a7
start implementing dual wielding
snipercup Jan 24, 2024
134fec6
Basic dual wielding
snipercup Jan 24, 2024
3888d22
two handed weapons clear the other hand slot
snipercup Jan 25, 2024
cd84ae2
Switch to list based inventory instead of grid
snipercup Jan 25, 2024
e85bf08
Fix inventory window layout
snipercup Jan 25, 2024
06ad207
Add volume to item editor
snipercup Jan 25, 2024
0931938
Change player sprite, apply rotation
snipercup Jan 26, 2024
0879cc4
Slopes are slopes instead of blocks
snipercup Jan 26, 2024
3591084
Add rocky hill map, json function
snipercup Jan 26, 2024
c0e2acf
Add tree, pinetree, willowtree
snipercup Jan 26, 2024
8fb2e60
Scaling on the mapeditor
snipercup Jan 26, 2024
41804eb
Furniture edge snapping
snipercup Jan 26, 2024
1468bc1
Scale furniture on map editor
snipercup Jan 26, 2024
dfeeba8
Save player equipment between saves
snipercup Jan 26, 2024
44b3b72
Rectangle select in all directions
snipercup Jan 27, 2024
af928c7
Remove size controls from map editor
snipercup Jan 27, 2024
8f18d72
Add map rotation to map editor
snipercup Jan 27, 2024
55f3cfd
Furniture rotates when map rotatates
snipercup Jan 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 0 additions & 19 deletions Blocks/Stairs_to_E001.tscn

This file was deleted.

20 changes: 0 additions & 20 deletions Blocks/Stairs_to_S001.tscn

This file was deleted.

20 changes: 0 additions & 20 deletions Blocks/Stairs_to_W001.tscn

This file was deleted.

18 changes: 0 additions & 18 deletions Blocks/concrete_wall001.tscn

This file was deleted.

18 changes: 0 additions & 18 deletions Blocks/concrete_wall002.tscn

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://buj4ukj1oh4pq"]

[ext_resource type="Texture2D" uid="uid://bu00lw1luehxr" path="res://Textures/Tiles/Actual textures/1.png" id="1_a2cuf"]
[ext_resource type="Texture2D" uid="uid://bu00lw1luehxr" path="res://Defaults/Sprites/1.png" id="1_a2cuf"]

[resource]
albedo_texture = ExtResource("1_a2cuf")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://pdqqtb1s8g6n"]

[ext_resource type="Texture2D" uid="uid://cyy4j5vso6khu" path="res://Textures/Tiles/Actual textures/4.png" id="1_rgn6b"]
[ext_resource type="Texture2D" uid="uid://cyy4j5vso6khu" path="res://Defaults/Sprites/4.png" id="1_rgn6b"]

[resource]
shading_mode = 0
Expand Down
4 changes: 4 additions & 0 deletions Blocks/grass_001.gd → Defaults/Blocks/default_block.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
extends StaticBody3D

var id: String = ""

func update_texture(material: BaseMaterial3D) -> void:
$MeshInstance3D.mesh = BoxMesh.new()
$MeshInstance3D.mesh.surface_set_material(0, material)

func get_texture_string() -> String:
return $MeshInstance3D.mesh.material.albedo_texture.resource_path
9 changes: 5 additions & 4 deletions Blocks/grass_001.tscn → Defaults/Blocks/default_block.tscn
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[gd_scene load_steps=5 format=3 uid="uid://cpaa3ui52a23c"]

[ext_resource type="Material" uid="uid://buj4ukj1oh4pq" path="res://Materials/floor1.tres" id="1_tldl5"]
[ext_resource type="Script" path="res://Blocks/grass_001.gd" id="1_yge5h"]
[ext_resource type="Script" path="res://Defaults/Blocks/default_block.gd" id="1_s3i5a"]
[ext_resource type="Material" uid="uid://buj4ukj1oh4pq" path="res://Defaults/Blocks/Materials/floor1.tres" id="2_ukdu8"]

[sub_resource type="BoxMesh" id="BoxMesh_j05ve"]
material = ExtResource("1_tldl5")
material = ExtResource("2_ukdu8")

[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_gyg2o"]
points = PackedVector3Array(0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5)

[node name="Grass001" type="StaticBody3D" groups=["navigation_mesh_source_group"]]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
disable_mode = 1
script = ExtResource("1_yge5h")
script = ExtResource("1_s3i5a")

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("BoxMesh_j05ve")
Expand Down
14 changes: 14 additions & 0 deletions Defaults/Blocks/default_slope.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends StaticBody3D

var id: String = ""

func update_texture(material: BaseMaterial3D) -> void:
var prism_mesh = PrismMesh.new()
prism_mesh.left_to_right = 1
prism_mesh.surface_set_material(0, material)

$MeshInstance3D.mesh = prism_mesh # Assign the new PrismMesh to the MeshInstance3D


func get_texture_string() -> String:
return $MeshInstance3D.mesh.material.albedo_texture.resource_path
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[gd_scene load_steps=4 format=3 uid="uid://dnsl5rk6de7na"]
[gd_scene load_steps=5 format=3 uid="uid://dnsl5rk6de7na"]

[ext_resource type="Material" uid="uid://pdqqtb1s8g6n" path="res://Materials/stairs1.tres" id="1_r8jiw"]
[ext_resource type="Script" path="res://Defaults/Blocks/default_slope.gd" id="1_x2ar8"]
[ext_resource type="Material" uid="uid://pdqqtb1s8g6n" path="res://Defaults/Blocks/Materials/stairs1.tres" id="2_qnimx"]

[sub_resource type="PrismMesh" id="PrismMesh_7xabc"]
material = ExtResource("1_r8jiw")
lightmap_size_hint = Vector2i(14, 21)
material = ExtResource("2_qnimx")
left_to_right = 1.0

[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_7isgt"]
Expand All @@ -12,6 +14,7 @@ points = PackedVector3Array(0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, -0.5, 0.5, 0.5,
[node name="StairsToN001" type="StaticBody3D" groups=["navigation_mesh_source_group"]]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
disable_mode = 1
script = ExtResource("1_x2ar8")

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("PrismMesh_7xabc")
Expand Down
25 changes: 25 additions & 0 deletions Defaults/Furniture/FurniturePhysics.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[gd_scene load_steps=5 format=3 uid="uid://cpmwu7v1r8cg8"]

[ext_resource type="Script" path="res://Scripts/FurniturePhysics.gd" id="1_klkkl"]
[ext_resource type="Texture2D" uid="uid://cqfqxgp12asw1" path="res://Mods/Core/Furniture/table_64.png" id="1_q67ig"]
[ext_resource type="PackedScene" uid="uid://mu6nbyuq02o5" path="res://Defaults/Mobs/mob_corpse.tscn" id="2_jy8nl"]

[sub_resource type="SphereShape3D" id="SphereShape3D_vweei"]
radius = 0.2

[node name="FurniturePhysics" type="RigidBody3D"]
collision_layer = 4
collision_mask = 7
axis_lock_angular_x = true
axis_lock_angular_z = true
linear_damp = 59.0
angular_damp = 59.0
script = ExtResource("1_klkkl")
corpse_scene = ExtResource("2_jy8nl")

[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
texture = ExtResource("1_q67ig")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_vweei")
21 changes: 21 additions & 0 deletions Defaults/Furniture/FurnitureStatic.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[gd_scene load_steps=5 format=3 uid="uid://cm4n8cljiij4w"]

[ext_resource type="Script" path="res://Scripts/FurnitureStatic.gd" id="1_wituf"]
[ext_resource type="PackedScene" uid="uid://mu6nbyuq02o5" path="res://Defaults/Mobs/mob_corpse.tscn" id="2_ln6uk"]
[ext_resource type="Texture2D" uid="uid://cqfqxgp12asw1" path="res://Mods/Core/Furniture/table_64.png" id="2_nt0ji"]

[sub_resource type="BoxShape3D" id="BoxShape3D_23dag"]
size = Vector3(0.4, 0.5, 0.4)

[node name="FurnitureStatic" type="StaticBody3D"]
axis_lock_angular_x = true
axis_lock_angular_z = true
script = ExtResource("1_wituf")
corpse_scene = ExtResource("2_ln6uk")

[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
texture = ExtResource("2_nt0ji")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_23dag")
Binary file added Defaults/Maps/Generichouse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Defaults/Maps/Generichouse.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://sqi8fd2vi8jr"
path="res://.godot/imported/Generichouse.png-54cdc2d9e4775bcd5290036badaeb324.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Defaults/Maps/Generichouse.png"
dest_files=["res://.godot/imported/Generichouse.png-54cdc2d9e4775bcd5290036badaeb324.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
114 changes: 114 additions & 0 deletions Defaults/Mobs/mob.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
[gd_scene load_steps=14 format=3 uid="uid://b2r6nh12wv41k"]

[ext_resource type="Script" path="res://Scripts/Mob.gd" id="1_ajqy0"]
[ext_resource type="PackedScene" uid="uid://mu6nbyuq02o5" path="res://Defaults/Mobs/mob_corpse.tscn" id="2_eldwl"]
[ext_resource type="Script" path="res://Scripts/StateMachine.gd" id="3_qfjv5"]
[ext_resource type="Script" path="res://Scripts/MobAttack.gd" id="4_fqxd2"]
[ext_resource type="Script" path="res://Scripts/MobIdle.gd" id="5_qf6ud"]
[ext_resource type="Script" path="res://Scripts/MobFollow.gd" id="6_va33k"]
[ext_resource type="Script" path="res://Scripts/Detection.gd" id="8_ugi6q"]
[ext_resource type="Texture2D" uid="uid://cy56wx4qynp3m" path="res://Textures/enemy.png" id="9_vd6sy"]
[ext_resource type="Shader" path="res://transparent_lighting.gdshader" id="10_qbt4f"]

[sub_resource type="SphereShape3D" id="SphereShape3D_uyii8"]
radius = 0.357674

[sub_resource type="BoxShape3D" id="BoxShape3D_kv6xp"]
size = Vector3(0.35, 0.35, 0.35)

[sub_resource type="ShaderMaterial" id="ShaderMaterial_vr552"]
render_priority = 0
shader = ExtResource("10_qbt4f")
shader_parameter/color = Color(1, 0.266667, 0.0509804, 1)
shader_parameter/energy = 1.0
shader_parameter/tex = ExtResource("9_vd6sy")

[sub_resource type="QuadMesh" id="QuadMesh_bbnvr"]
lightmap_size_hint = Vector2i(7, 7)
material = SubResource("ShaderMaterial_vr552")
size = Vector2(0.5, 0.5)
orientation = 1

[node name="Mob" type="CharacterBody3D" groups=["Enemies"]]
collision_layer = 2
collision_mask = 3
wall_min_slide_angle = 0.0
floor_constant_speed = true
script = ExtResource("1_ajqy0")
corpse_scene = ExtResource("2_eldwl")

[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]
path_desired_distance = 0.5
target_desired_distance = 0.5
path_max_distance = 0.51
avoidance_enabled = true
debug_enabled = true

[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("initial_state")]
script = ExtResource("3_qfjv5")
initial_state = NodePath("MobIdle")

[node name="MobAttack" type="Node3D" parent="StateMachine" node_paths=PackedStringArray("attack_timer", "mob")]
script = ExtResource("4_fqxd2")
attack_timer = NodePath("AttackCooldown")
mob = NodePath("../..")

[node name="AttackCooldown" type="Timer" parent="StateMachine/MobAttack"]

[node name="MobIdle" type="Node3D" parent="StateMachine" node_paths=PackedStringArray("nav_agent", "mob", "moving_timer")]
script = ExtResource("5_qf6ud")
nav_agent = NodePath("../../NavigationAgent3D")
mob = NodePath("../..")
move_distance = 50.0
moving_timer = NodePath("MovingCooldown")

[node name="MovingCooldown" type="Timer" parent="StateMachine/MobIdle"]
wait_time = 4.0

[node name="MobFollow" type="Node3D" parent="StateMachine" node_paths=PackedStringArray("nav_agent", "mob", "pathfinding_timer")]
script = ExtResource("6_va33k")
nav_agent = NodePath("../../NavigationAgent3D")
mob = NodePath("../..")
mobCol = NodePath("../../CollisionShape3D")
pathfinding_timer = NodePath("Timer")

[node name="Timer" type="Timer" parent="StateMachine/MobFollow"]
wait_time = 0.2
autostart = true

[node name="Detection" type="Node3D" parent="." node_paths=PackedStringArray("mob")]
script = ExtResource("8_ugi6q")
mob = NodePath("..")

[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0275174, 0)
visible = false
layers = 16
gi_mode = 0
pixel_size = 0.05
billboard = 1
shaded = true
double_sided = false
texture = ExtResource("9_vd6sy")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
visible = false
shape = SubResource("SphereShape3D_uyii8")
disabled = true

[node name="CollisionShape3D2" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_kv6xp")

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.20019, 0)
layers = 16
cast_shadow = 0
gi_mode = 0
mesh = SubResource("QuadMesh_bbnvr")

[connection signal="timeout" from="StateMachine/MobAttack/AttackCooldown" to="StateMachine/MobAttack" method="_on_attack_cooldown_timeout"]
[connection signal="timeout" from="StateMachine/MobIdle/MovingCooldown" to="StateMachine/MobIdle" method="_on_moving_cooldown_timeout"]
[connection signal="timeout" from="StateMachine/MobFollow/Timer" to="StateMachine/MobFollow" method="_on_timer_timeout"]
[connection signal="player_spotted" from="Detection" to="StateMachine/MobAttack" method="_on_detection_player_spotted"]
[connection signal="player_spotted" from="Detection" to="StateMachine/MobIdle" method="_on_detection_player_spotted"]
[connection signal="player_spotted" from="Detection" to="StateMachine/MobFollow" method="_on_detection_player_spotted"]
Loading