Raised This Month: $ Target: $400
 0% 

Emit sound at origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VarmVaffel
Member
Join Date: Feb 2005
Location: Norway
Old 03-27-2005 , 11:41   Emit sound at origin
Reply With Quote #1

Is it possible to play a a sound effect at a certain origin, and in that case how?

- VV
VarmVaffel is offline
Ced
Member
Join Date: Oct 2004
Old 03-28-2005 , 00:03  
Reply With Quote #2

make an invisible entity at your origin and play the sound from it
Ced is offline
VarmVaffel
Member
Join Date: Feb 2005
Location: Norway
Old 03-28-2005 , 06:11  
Reply With Quote #3

But musn't the index be a player entity between 1 and 32 ?

Code:
emit_sound ( index, channel, sample[], Float:vol, Float:att,flags, pitch ) Notes: index,is a player index from 1 to 32.
VarmVaffel is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-28-2005 , 10:50  
Reply With Quote #4

The id does not hve to be a player.

I like to do it like this though:

Code:
public overhear(Float:startor[3],Float:dist,Sound[]) {     for(new i=0; i < get_maxplayers(); i++)     {         new Float:Porigin[3]         entity_get_vector(i,EV_VEC_origin,Porigin)         if(dist > vector_distance(Porigin,startor) ) emit_sound ( i, channel, Sound, Float:vol, Float:att,flags, pitch ) // fill in this     }     return 1; }

Or something similar.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-28-2005 , 17:27  
Reply With Quote #5

That'll come up with player not in-game errors and will cause one version of the sound to emit from every single player, causing players to hear multiple versions if other users are nearby.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 09:56.


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