Raised This Month: $12 Target: $400
 3% 

Solved [ H3LP ] Stop Entity sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-06-2017 , 08:01   [ H3LP ] Stop Entity sound
Reply With Quote #1

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 !

Last edited by DarthMan; 10-13-2017 at 13:04. Reason: Solved
DarthMan is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 10-06-2017 , 09:14   Re: [ H3LP ] Stop Entity sound
Reply With Quote #2

similar like this way :
https://forums.alliedmods.net/showpo...51&postcount=8
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-06-2017 , 09:25   Re: [ H3LP ] Stop Entity sound
Reply With Quote #3

Quote:
Originally Posted by abdobiskra View Post
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.
DarthMan is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-06-2017 , 17:08   Re: [ H3LP ] Stop Entity sound
Reply With Quote #4

Use SND_STOP flag on emit_sound.
__________________








CrazY. is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-06-2017 , 18:34   Re: [ H3LP ] Stop Entity sound
Reply With Quote #5

Quote:
Originally Posted by CrazY. View Post
Use SND_STOP flag on emit_sound.
It doesn't work, becuz the sound, i beleive, comes from an ambient_generic.
DarthMan is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-06-2017 , 18:53   Re: [ H3LP ] Stop Entity sound
Reply With Quote #6

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.
__________________








CrazY. is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-07-2017 , 05:54   Re: [ H3LP ] Stop Entity sound
Reply With Quote #7

Quote:
Originally Posted by CrazY. View Post
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.
DarthMan is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 10-07-2017 , 06:20   Re: [ H3LP ] Stop Entity sound
Reply With Quote #8

Quote:
Originally Posted by DarthMan View Post
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
__________________

Last edited by abdobiskra; 10-07-2017 at 06:22.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-08-2017 , 12:48   Re: [ H3LP ] Stop Entity sound
Reply With Quote #9

Quote:
Originally Posted by abdobiskra View Post
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.
DarthMan is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-08-2017 , 13:29   Re: [ H3LP ] Stop Entity sound
Reply With Quote #10

You can try do that with FM_EmitSound/FM_AmbientSound.
__________________








CrazY. is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:09.


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