AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved [ H3LP ] Stop Entity sound (https://forums.alliedmods.net/showthread.php?t=301832)

DarthMan 10-06-2017 08:01

[ H3LP ] Stop Entity sound
 
Hello. So in maps like lambda_bunker for example, there are brush entities like the fan. The thing is, when I remove the fan the sound is still playing. How can I stop it as well? I tried using emit_sound on CHAN_STATIC but that didn't work. Thanks !

abdobiskra 10-06-2017 09:14

Re: [ H3LP ] Stop Entity sound
 
similar like this way :
https://forums.alliedmods.net/showpo...51&postcount=8

DarthMan 10-06-2017 09:25

Re: [ H3LP ] Stop Entity sound
 
Quote:

Originally Posted by abdobiskra (Post 2552881)

Well, I want to do this on specific entity remove, so that the sound will no longer be played once the entity is removed. I don't want to block the sound on map start.

CrazY. 10-06-2017 17:08

Re: [ H3LP ] Stop Entity sound
 
Use SND_STOP flag on emit_sound.

DarthMan 10-06-2017 18:34

Re: [ H3LP ] Stop Entity sound
 
Quote:

Originally Posted by CrazY. (Post 2552947)
Use SND_STOP flag on emit_sound.

It doesn't work, becuz the sound, i beleive, comes from an ambient_generic.

CrazY. 10-06-2017 18:53

Re: [ H3LP ] Stop Entity sound
 
I don't think if this will work, but you can try block the sound to be reproduced, create an entity, play the sound again from this entity, use SND_STOP when you want to stop the sound and remove that entity.

DarthMan 10-07-2017 05:54

Re: [ H3LP ] Stop Entity sound
 
Quote:

Originally Posted by CrazY. (Post 2552959)
I don't think if this will work, but you can try block the sound to be reproduced, create an entity, play the sound again from this entity, use SND_STOP when you want to stop the sound and remove that entity.

That will only work for a specific sound not for any sound.

abdobiskra 10-07-2017 06:20

Re: [ H3LP ] Stop Entity sound
 
Quote:

Originally Posted by DarthMan (Post 2552883)
Well, I want to do this on specific entity remove, so that the sound will no longer be played once the entity is removed. I don't want to block the sound on map start.

Make a global boolean or create an array to store for when u want it removed and where u dont need

DarthMan 10-08-2017 12:48

Re: [ H3LP ] Stop Entity sound
 
Quote:

Originally Posted by abdobiskra (Post 2553018)
Make a global boolean or create an array to store for when u want it removed and where u dont need

Man u don't understand, I don't want to remvoe a specific sound. I want to remove any sound that would be played by the entity that I want to remove, not just specific sound.

CrazY. 10-08-2017 13:29

Re: [ H3LP ] Stop Entity sound
 
You can try do that with FM_EmitSound/FM_AmbientSound.


All times are GMT -4. The time now is 02:50.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.