Skip to content

Enemy: Play Mothsache attack sound effect on player detection - #2802

Open
Brandon-code96 wants to merge 2 commits into
endlessm:mainfrom
Brandon-code96:main
Open

Enemy: Play Mothsache attack sound effect on player detection#2802
Brandon-code96 wants to merge 2 commits into
endlessm:mainfrom
Brandon-code96:main

Conversation

@Brandon-code96

@Brandon-code96 Brandon-code96 commented Aug 28, 2026

Copy link
Copy Markdown

Enemy: Play Mothsache attack sound effect on player detection

The Mothsache enemy now plays an attack sound effect when entering the attacking state upon detecting the player.

  • Added an AudioStreamPlayer node and linked the attack sound stream to the Mothsache component.
  • Implemented corresponding setter functions in the GDScript logic to safely handle audio stream assignments.

Resolves #1020

@Brandon-code96
Brandon-code96 requested review from a team as code owners August 28, 2026 02:57

@manuq manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of unwanted changes in this pull request. Please start by cleaning up.

For the pull request description, please follow our contributing guidelines.

Comment thread scenes/game_elements/characters/components/sprite_frames/storyweaver_purple.tres Outdated
@wjt wjt changed the title play Mothsache attack sound effect on player detection #1020 Play Mothsache attack sound effect on player detection Sep 9, 2026
@Brandon-code96 Brandon-code96 changed the title Play Mothsache attack sound effect on player detection Enemy: Play Mothsache attack sound effect on player detection Sep 9, 2026
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/Brandon-code96/main/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@manuq manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't realize that this was ready for review again. Next time click "Request" or leave us a comment to let us know.

This is not for this pull request, but testing it I realize that the WAV file (from a previous contributor) has a noise in this part, that I think is unwanted:

Image

Please check the comment on using the AudioStreamPlayer2D node and the WAV folder location. The rest looks good, except there are trailing-whitespace errors. Check https://github.com/endlessm/threadbare/actions/runs/34403586388/job/102863419384 and if you want them automatically fixed, you can install pre-commit as explained here https://github.com/endlessm/threadbare/wiki/Contributing#coding-style

Comment thread scenes/game_elements/characters/enemies/mothsache/Mothsache.tscn Outdated
Comment thread scenes/game_elements/characters/enemies/mothsache/mothsache.gd Outdated
Comment thread assets/third_party/sounds/characters/enemies/guard/AttackSound.wav Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Play Mothsache sound effect when the attack animation triggers

2 participants