Raised This Month: $ Target: $400
 0% 

Can't stop entities emit_sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BeasT
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 07-12-2012 , 18:35   Can't stop entities emit_sound
Reply With Quote #1

I'm starting the sound for env_sprite entity like this:

Code:
emit_sound(ent, CHAN_STATIC, "ambience/alien_beacon.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
The sound loops all the time, it's fine for me.

But before deleting the entity, I want the sound to stop playing, so I use:

Code:
emit_sound(ent, CHAN_STATIC, "ambience/alien_beacon.wav", VOL_NORM, ATTN_NORM, SND_STOP, PITCH_NORM)
But that does not work, the sound still plays.

Also tried this:

Code:
message_begin(MSG_BROADCAST, SVC_STOPSOUND)
write_short(ent)
message_end()
Doesn't work either (maybe I use it wrong?)

The only thing that worked was client_cmd(0, "stopsound"), but that is not suitable for me because it stops other sounds.

So how to stop the sound?

Last edited by BeasT; 07-12-2012 at 18:51.
BeasT is offline
Send a message via Skype™ to BeasT
 


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 15:10.


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