A_StopAllSounds

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

A_StopAllSounds

Post by Major Cooke »

Pull Request

And a test sample:

Code: Select all

Class z : Actor
{
	Default
	{
		Radius 13;
		Height 8;
		Speed 25;
		Damage 5;
		Projectile;
		+RANDOMIZE
		+ZDOOMTRANS
		+BRIGHT
		RenderStyle "Add";
		Alpha 0.75;
		Obituary "$OB_MPPLASMARIFLE";
	}
	States
	{
	Spawn:
		PLSS A 6 A_StartSound("weapons/plasmaf", 8);
		PLSS B 6 A_StartSound("weapons/plasmaf", 9);
		Loop;
	Death:
		PLSE A 4
		{
			A_StopAllSounds();
			A_StartSound("weapons/plasmax");
		}
		PLSE ABCDE 4;
		Stop;
	}
}
Last edited by Major Cooke on Sat Feb 29, 2020 12:14 pm, edited 1 time in total.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: A_StopAllSounds

Post by Marisa the Magician »

I would appreciate this too.
User avatar
Uni-000
Posts: 24
Joined: Sat Apr 01, 2017 5:23 pm

Re: A_StopAllScreeching

Post by Uni-000 »

Mmm, tasty Idea, I think this would do!
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_StopAllSounds

Post by Matt »

Related request: IsActorPlayingAnySound()
User avatar
Uni-000
Posts: 24
Joined: Sat Apr 01, 2017 5:23 pm

Re: A_StopAllSounds

Post by Uni-000 »

Matt wrote:Related request: IsActorPlayingAnySound()
Could be useful for TItlemaps. +1
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: A_StopAllSounds

Post by Major Cooke »

Matt, you should make a new thread for it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_StopAllSounds

Post by Graf Zahl »

Matt wrote:Related request: IsActorPlayingAnySound()

Can already be done by passing 0 for the channel and sound id to the existing check functions.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_StopAllSounds

Post by Matt »

Sweet, that would've been exactly what I would've suggested had it not already been the case!
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: A_StopAllSounds

Post by Major Cooke »

Post Reply

Return to “Closed Feature Suggestions [GZDoom]”