SoundStarted Event

Moderator: GZDoom Developers

Post Reply
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

SoundStarted Event

Post by m8f »

Suggestion: add

Code: Select all

virtual void SoundStarted(SoundEvent event)
to EventHandler.

Where SoundEvent is something like

Code: Select all

struct SoundEvent
{
  Actor source;
  Sound soundId;
}
The position of the sound could be accessed through Actor. The length of the sound could be accessed through S_GetLength(Sound sound_id).

Rationale:
1. Allows creating modifications that display the directional sound, useful for people with hearing issues, and/or playing without speakers/headphones.
2. Allows creating custom behavior, like monster reaction to certain sounds.

Creating this as a feature suggestion because I'm not sure how to implement this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: SoundStarted Event

Post by Graf Zahl »

Ugh...
Let's bury this as quickly as possible. I cannot see any useful way to handle this without exposing implementation details to the script.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”