From 4d5f69398e78960b75fb5644b67c452822503bf6 Mon Sep 17 00:00:00 2001 From: vengefulcartographer <76922012+vengefulcartographer@users.noreply.github.com> Date: Sat, 19 Aug 2023 15:41:47 -0600 Subject: [PATCH] grape guy souns --- godot/Models/grape_man.gd | 7 ++++++- godot/Models/grape_man.tscn | 26 ++++++++++++++++++-------- godot/Models/island.tscn | 4 ++-- godot/sfx/dropgrunt.ogg | 3 +++ godot/sfx/dropgrunt.ogg.import | 19 +++++++++++++++++++ godot/sfx/heartychuckle.ogg | 3 +++ godot/sfx/heartychuckle.ogg.import | 19 +++++++++++++++++++ godot/sfx/pickupgrunt.ogg | 3 +++ godot/sfx/pickupgrunt.ogg.import | 19 +++++++++++++++++++ godot/tests/test_slime_animation.tscn | 2 +- 10 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 godot/sfx/dropgrunt.ogg create mode 100644 godot/sfx/dropgrunt.ogg.import create mode 100644 godot/sfx/heartychuckle.ogg create mode 100644 godot/sfx/heartychuckle.ogg.import create mode 100644 godot/sfx/pickupgrunt.ogg create mode 100644 godot/sfx/pickupgrunt.ogg.import diff --git a/godot/Models/grape_man.gd b/godot/Models/grape_man.gd index 74d4784..be4dee5 100644 --- a/godot/Models/grape_man.gd +++ b/godot/Models/grape_man.gd @@ -1,7 +1,7 @@ extends Node3D @onready var animation: AnimationNodeStateMachinePlayback = $AnimationTree.get("parameters/playback") - +@onready var player_sounds = $PlayerSounds signal anim_check_grab(position: Vector3) @@ -35,3 +35,8 @@ func animation_key_grab(): func animation_key_pickup_completed(): pickup_animation_in_progress = false emit_signal("pickup_animation_finished") + +func _on_animation_tree_animation_finished(anim_name): + if anim_name == "WalkHold": + player_sounds.set_stream(preload("res://sfx/dropgrunt.ogg")) + player_sounds.play() diff --git a/godot/Models/grape_man.tscn b/godot/Models/grape_man.tscn index 95045bf..c5d451d 100644 --- a/godot/Models/grape_man.tscn +++ b/godot/Models/grape_man.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=38 format=3 uid="uid://bgoo1lbt28na"] +[gd_scene load_steps=39 format=3 uid="uid://bgoo1lbt28na"] [ext_resource type="PackedScene" uid="uid://bhanbx2dyhv2d" path="res://Models/grape_man.glb" id="1_fh5yr"] [ext_resource type="Script" path="res://Models/grape_man.gd" id="2_ksje8"] +[ext_resource type="AudioStream" uid="uid://bj1mb2km8fm8a" path="res://sfx/dropgrunt.ogg" id="3_nivx1"] [sub_resource type="AnimationNodeAdd2" id="AnimationNodeAdd2_a0vxm"] filter_enabled = true @@ -150,24 +151,28 @@ states/WalkEmpty/position = Vector2(619, 219) states/WalkHold/node = SubResource("AnimationNodeBlendTree_kalnq") states/WalkHold/position = Vector2(351, 323) transitions = ["Start", "IdleEmpty", SubResource("AnimationNodeStateMachineTransition_8sw6d"), "IdleEmpty", "WalkHold", SubResource("AnimationNodeStateMachineTransition_71rn8"), "WalkHold", "IdleEmpty", SubResource("AnimationNodeStateMachineTransition_cp7lp"), "WalkEmpty", "IdleEmpty", SubResource("AnimationNodeStateMachineTransition_27n2r"), "IdleEmpty", "WalkEmpty", SubResource("AnimationNodeStateMachineTransition_v26jl"), "IdleHold", "WalkHold", SubResource("AnimationNodeStateMachineTransition_u0rau"), "IdleHold", "WalkEmpty", SubResource("AnimationNodeStateMachineTransition_1hqga"), "WalkEmpty", "IdleHold", SubResource("AnimationNodeStateMachineTransition_uekhs"), "WalkHold", "IdleHold", SubResource("AnimationNodeStateMachineTransition_652wi"), "IdleEmpty", "Pickup", SubResource("AnimationNodeStateMachineTransition_sdgve"), "Pickup", "IdleEmpty", SubResource("AnimationNodeStateMachineTransition_otprv"), "IdleEmpty", "IdleHold", SubResource("AnimationNodeStateMachineTransition_fbwhh"), "IdleHold", "IdleEmpty", SubResource("AnimationNodeStateMachineTransition_4rq7a"), "WalkHold", "WalkEmpty", SubResource("AnimationNodeStateMachineTransition_oange"), "WalkEmpty", "WalkHold", SubResource("AnimationNodeStateMachineTransition_et4tx"), "Pickup", "IdleHold", SubResource("AnimationNodeStateMachineTransition_y2dr5"), "IdleHold", "Pickup", SubResource("AnimationNodeStateMachineTransition_ubbuf")] -graph_offset = Vector2(26, 89) +graph_offset = Vector2(-41, 73) [node name="grape_man" instance=ExtResource("1_fh5yr")] transform = Transform3D(0.065, 0, 0, 0, 0.065, 0, 0, 0, 0.065, 0, 0, 0) script = ExtResource("2_ksje8") [node name="Skeleton3D" parent="rig" index="0"] -bones/0/rotation = Quaternion(0.0672962, 0, 0, 0.997733) +bones/0/position = Vector3(0, 1.03829, -0.022716) +bones/0/rotation = Quaternion(0.0615938, 0, 0, 0.998101) bones/1/rotation = Quaternion(-0.0891896, 1.18734e-07, -1.06322e-08, 0.996015) -bones/2/rotation = Quaternion(0.0133933, -1.19199e-07, 1.5966e-09, 0.99991) -bones/3/rotation = Quaternion(-0.00997737, 0.100365, -0.694951, 0.711948) -bones/4/rotation = Quaternion(0.0687327, -0.0343696, -0.655545, 0.751236) +bones/2/rotation = Quaternion(0.0133932, -1.19199e-07, 1.5966e-09, 0.99991) +bones/3/rotation = Quaternion(0.467612, 0.0653885, -0.582913, 0.661268) +bones/4/rotation = Quaternion(0.533287, -0.180573, 0.469101, 0.680399) bones/4/scale = Vector3(1, 1, 1) -bones/5/rotation = Quaternion(-0.00997737, -0.100365, 0.694951, 0.711948) -bones/6/rotation = Quaternion(0.0687327, 0.0343696, 0.655545, 0.751236) +bones/5/rotation = Quaternion(0.467612, -0.0653884, 0.582913, 0.661268) +bones/6/rotation = Quaternion(0.533287, 0.180573, -0.469101, 0.680399) bones/6/scale = Vector3(1, 1, 1) bones/7/rotation = Quaternion(0.0142813, -6.34259e-18, -4.44044e-16, 0.999898) +bones/8/rotation = Quaternion(0.197065, 6.31981e-16, -1.33238e-15, 0.98039) +bones/9/position = Vector3(0.155448, 0.891297, -0.0224623) bones/10/rotation = Quaternion(0.105246, 0.0039338, -0.0113526, 0.994374) +bones/14/position = Vector3(-0.155448, 0.891297, -0.0224622) bones/15/rotation = Quaternion(0.105246, -0.0039338, 0.0113526, 0.994374) [node name="GrabPointLocation" type="Node3D" parent="." index="2"] @@ -184,3 +189,8 @@ parameters/IdleEmpty/Add2/add_amount = 1.0 parameters/IdleHold/Add2/add_amount = 1.0 parameters/WalkEmpty/Add2/add_amount = 1.0 parameters/WalkHold/Add2/add_amount = 1.0 + +[node name="PlayerSounds" type="AudioStreamPlayer" parent="." index="5"] +stream = ExtResource("3_nivx1") + +[connection signal="animation_finished" from="AnimationTree" to="." method="_on_animation_tree_animation_finished"] diff --git a/godot/Models/island.tscn b/godot/Models/island.tscn index a6d1deb..cd6d5e6 100644 --- a/godot/Models/island.tscn +++ b/godot/Models/island.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=6 format=3 uid="uid://difi2tur2j4dg"] [ext_resource type="PackedScene" uid="uid://dfyt6kjw8yli" path="res://Models/island.glb" id="1_5vc8b"] -[ext_resource type="Material" uid="uid://yuhlhpwji3c4" path="res://Textures/dirt.tres" id="2_bgydn"] +[ext_resource type="Material" uid="uid://yuhlhpwji3c4" path="res://Textures/dirt.tres" id="2_0hsca"] [ext_resource type="Material" uid="uid://b88xmds4mx7rd" path="res://Textures/grass.tres" id="2_knbpa"] [sub_resource type="BoxShape3D" id="BoxShape3D_1k3v7"] @@ -12,7 +12,7 @@ data = PackedVector3Array(-0.573, 1.014, 0.0277, -0.534, 1.041, 0.0706, -0.5395, [node name="island" instance=ExtResource("1_5vc8b")] [node name="Island" parent="." index="0"] -material_override = ExtResource("2_bgydn") +surface_material_override/0 = ExtResource("2_0hsca") [node name="StaticBody3D" type="StaticBody3D" parent="Island" index="0"] diff --git a/godot/sfx/dropgrunt.ogg b/godot/sfx/dropgrunt.ogg new file mode 100644 index 0000000..7e1eee8 --- /dev/null +++ b/godot/sfx/dropgrunt.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37b68e9dff90811985aeaf4f7280a1cb38d84195a733e4f7c5d8588c248dc6c6 +size 19458 diff --git a/godot/sfx/dropgrunt.ogg.import b/godot/sfx/dropgrunt.ogg.import new file mode 100644 index 0000000..bc6d816 --- /dev/null +++ b/godot/sfx/dropgrunt.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://bj1mb2km8fm8a" +path="res://.godot/imported/dropgrunt.ogg-52a4370eeeff0d05935e68ca8f761238.oggvorbisstr" + +[deps] + +source_file="res://sfx/dropgrunt.ogg" +dest_files=["res://.godot/imported/dropgrunt.ogg-52a4370eeeff0d05935e68ca8f761238.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/godot/sfx/heartychuckle.ogg b/godot/sfx/heartychuckle.ogg new file mode 100644 index 0000000..c71c074 --- /dev/null +++ b/godot/sfx/heartychuckle.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14aef7dc99df57ddc18cfb036f556e54ffadb6c41c24cc2be9e249755c75d9eb +size 23905 diff --git a/godot/sfx/heartychuckle.ogg.import b/godot/sfx/heartychuckle.ogg.import new file mode 100644 index 0000000..7f7e424 --- /dev/null +++ b/godot/sfx/heartychuckle.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://bpi7nhau66pmh" +path="res://.godot/imported/heartychuckle.ogg-2c15818a62bdef41bf1df2c79e7e24f2.oggvorbisstr" + +[deps] + +source_file="res://sfx/heartychuckle.ogg" +dest_files=["res://.godot/imported/heartychuckle.ogg-2c15818a62bdef41bf1df2c79e7e24f2.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/godot/sfx/pickupgrunt.ogg b/godot/sfx/pickupgrunt.ogg new file mode 100644 index 0000000..a6c8a12 --- /dev/null +++ b/godot/sfx/pickupgrunt.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4d1515849ba224c51cb3c815ed963aeffa9c398ae421ef816a6b6461e8b9492 +size 31123 diff --git a/godot/sfx/pickupgrunt.ogg.import b/godot/sfx/pickupgrunt.ogg.import new file mode 100644 index 0000000..1a7ed39 --- /dev/null +++ b/godot/sfx/pickupgrunt.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dvy863exkepia" +path="res://.godot/imported/pickupgrunt.ogg-7b3d40c25d6a890b26b1bdae56312a3d.oggvorbisstr" + +[deps] + +source_file="res://sfx/pickupgrunt.ogg" +dest_files=["res://.godot/imported/pickupgrunt.ogg-7b3d40c25d6a890b26b1bdae56312a3d.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/godot/tests/test_slime_animation.tscn b/godot/tests/test_slime_animation.tscn index 24f373d..a477e7c 100644 --- a/godot/tests/test_slime_animation.tscn +++ b/godot/tests/test_slime_animation.tscn @@ -39,7 +39,7 @@ layout_mode = 2 text = "Walk" [node name="Camera3D" type="Camera3D" parent="."] -transform = Transform3D(0.999682, 0, -0.0251998, 0, 1, 0, 0.0251998, 0, 0.999682, 0, 0.138, 0.315) +transform = Transform3D(0.999682, 0, -0.0251998, 0, 1, 0, 0.0251998, 0, 0.999682, 0, 1.60084, 4.98142) current = true [connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/Idle" to="." method="_on_idle_pressed"]