Raised This Month: $ Target: $400
 0% 

Emit Sound or Ambient Sound question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 12-15-2014 , 21:44   Emit Sound or Ambient Sound question
Reply With Quote #1

How I can emit sound for individual player in ent radius? I use:
Code:
engfunc(EngFunc_EmitAmbientSound, g_point_entuty, fOrigin, g_szBombSounds[0], 0.5, ATTN_NORM, 0, PITCH_NORM);
but it's works for all players..

Last edited by ZASTRELIS; 12-15-2014 at 23:39.
ZASTRELIS is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-15-2014 , 22:28   Re: Emit Sound question
Reply With Quote #2

emit_sound() does what you are asking except you can't choose the radius. I'm not sure how it chooses a radius but not everybody can hear it.

Also, it looks like what you are doing there is an inefficient method of implementing emit_sound().
__________________

Last edited by fysiks; 12-15-2014 at 22:30.
fysiks is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 12-15-2014 , 23:09   Re: Emit Sound question
Reply With Quote #3

I use EmitAmbientSound for playing sample when player has reaches radius where sample can play
but it works for all players in rad, I want do it for each player.

Last edited by ZASTRELIS; 12-15-2014 at 23:10.
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 12-15-2014 , 23:27   Re: Emit Sound question
Reply With Quote #4

Code:
engfunc(EngFunc_EmitAmbientSound, PLAYER_id, ENTITY_fOrigin, g_szBombSounds[0], 0.5, ATTN_NORM, 0, PITCH_NORM);
Individual Player hear sample everywhere. ENTITY_fOrigin not works.

Code:
engfunc(EngFunc_EmitAmbientSound, ENTYTY_id, ENTITY_fOrigin, g_szBombSounds[0], 0.5, ATTN_NORM, 0, PITCH_NORM);
All players hear sample only in ENTITY radius. ENTITY_fOrigin works.
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 12-15-2014 , 23:30   Re: Emit Sound question
Reply With Quote #5

Why i need this? Because when player goes on from samples' radius and back up sound not played.
ZASTRELIS is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 12-16-2014 , 02:13   Re: Emit Sound or Ambient Sound question
Reply With Quote #6

Why not check the radius and use client_cmd?
RateX is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 12-16-2014 , 02:14   Re: Emit Sound or Ambient Sound question
Reply With Quote #7

Quote:
Originally Posted by RateX View Post
Why not check the radius and use client_cmd?
attenuation radius
ZASTRELIS is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-16-2014 , 13:17   Re: Emit Sound or Ambient Sound question
Reply With Quote #8

here any example [S:]-

PHP Code:
                     emit_sound(entity_idCHAN_BODY"Sound"VOL_NORMATTN_NORM0PITCH_NORM
i think it dose start sound, if a player near the entity will hear it....
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-16-2014 , 18:50   Re: Emit Sound or Ambient Sound question
Reply With Quote #9

It's possible to restrict who hears player voices but not sounds that are played in the map AFAIK.
__________________
fysiks is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 12-17-2014 , 05:13   Re: Emit Sound or Ambient Sound question
Reply With Quote #10

and what about SVC_SPAWNSTATICSOUND? It might be what you need.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
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 15:29.


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