From bf24a280d6bd66a5d40bb44368cc26b0c28755e4 Mon Sep 17 00:00:00 2001 From: Rob Kelly Date: Fri, 22 Nov 2024 21:39:37 -0700 Subject: [PATCH] Explosion sound effect --- asset_credits.org | 8 +++++ assets/sound/sfx/player/explosion.mp3 | 3 ++ assets/sound/sfx/player/explosion.mp3.import | 19 +++++++++++ src/player/shot_setup/shot_setup.tscn | 36 +++++++++++++++++++- 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 assets/sound/sfx/player/explosion.mp3 create mode 100644 assets/sound/sfx/player/explosion.mp3.import diff --git a/asset_credits.org b/asset_credits.org index 6a3ee94..5131791 100644 --- a/asset_credits.org +++ b/asset_credits.org @@ -102,3 +102,11 @@ Asset credits *** Author: Elements-Library *** License: CC0 + +** explosion.mp3 + +*** Retrieved from https://pixabay.com/sound-effects/grenade-explosion-14-190266/ + +*** Author: DavidDumaisAudio + +*** License: Pixabay diff --git a/assets/sound/sfx/player/explosion.mp3 b/assets/sound/sfx/player/explosion.mp3 new file mode 100644 index 0000000..a83f221 --- /dev/null +++ b/assets/sound/sfx/player/explosion.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ef0ad9ea8deb68a20e215edb02e66750929b7a714fcc38b65780467bd2407c9 +size 69120 diff --git a/assets/sound/sfx/player/explosion.mp3.import b/assets/sound/sfx/player/explosion.mp3.import new file mode 100644 index 0000000..920fa36 --- /dev/null +++ b/assets/sound/sfx/player/explosion.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://cvsv02inxvsyw" +path="res://.godot/imported/explosion.mp3-7499f525d153013b4f2692e529312448.mp3str" + +[deps] + +source_file="res://assets/sound/sfx/player/explosion.mp3" +dest_files=["res://.godot/imported/explosion.mp3-7499f525d153013b4f2692e529312448.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/src/player/shot_setup/shot_setup.tscn b/src/player/shot_setup/shot_setup.tscn index 58ecbe7..1b268ba 100644 --- a/src/player/shot_setup/shot_setup.tscn +++ b/src/player/shot_setup/shot_setup.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=32 format=3 uid="uid://cy7t2tc4y3b4"] +[gd_scene load_steps=34 format=3 uid="uid://cy7t2tc4y3b4"] [ext_resource type="Script" path="res://src/player/shot_setup/shot_setup.gd" id="1_r6ei4"] [ext_resource type="Script" path="res://src/player/shot_setup/ball_point.gd" id="2_e6i3g"] @@ -15,6 +15,7 @@ [ext_resource type="Script" path="res://src/player/shot_setup/hitbox.gd" id="7_uh8kn"] [ext_resource type="Texture2D" uid="uid://2yoipvd107t1" path="res://assets/sprites/dope_explosion/dope_explosion.tres" id="8_5ghmo"] [ext_resource type="FontFile" uid="uid://dsa0oh7c0h4pu" path="res://assets/fonts/Racing_Sans_One/RacingSansOne-Regular.ttf" id="9_y5iv1"] +[ext_resource type="AudioStream" uid="uid://cvsv02inxvsyw" path="res://assets/sound/sfx/player/explosion.mp3" id="15_fn6g1"] [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_gh0gi"] random_pitch = 1.1 @@ -242,6 +243,18 @@ tracks/1/keys = { "update": 1, "values": [false] } +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = false +tracks/2/path = NodePath("ExplosionMesh/ExplosionSFXPlayer:playing") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} [sub_resource type="Animation" id="Animation_bv1ov"] resource_name = "explode" @@ -270,6 +283,18 @@ tracks/1/keys = { "update": 1, "values": [true, false] } +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("ExplosionMesh/ExplosionSFXPlayer:playing") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_dg262"] _data = { @@ -277,6 +302,11 @@ _data = { "explode": SubResource("Animation_bv1ov") } +[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_8natr"] +random_pitch = 1.1 +streams_count = 1 +stream_0/stream = ExtResource("15_fn6g1") + [node name="ShotSetup" type="Node3D"] script = ExtResource("1_r6ei4") @@ -467,6 +497,10 @@ libraries = { "": SubResource("AnimationLibrary_dg262") } +[node name="ExplosionSFXPlayer" type="AudioStreamPlayer3D" parent="ExplosionMesh"] +stream = SubResource("AudioStreamRandomizer_8natr") +unit_size = 60.0 + [node name="PlayerLabel" type="Label3D" parent="."] unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0)