Raised This Month: $ Target: $400
 0% 

emit_sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 09-17-2004 , 16:13   emit_sound
Reply With Quote #1

1) i have a wav which a a loop mark in it and when using emit_sound, it loops, thats ok
a) but after sometime i want to stop it. how to do this?
b) when sound starts to loop and then a player joins, he wont hear the sound until the entity that emits the sound is respawned (using just emit_sound(...) dont work)

2) emit_sound(index, channel, sample[], Float:vol, Float:att,flags, pitch)
what are the flags for? which flag does what? i have searched the internet but did not find any hint on this, or even any explanation about emit_sound
__________________
alias White Panther
karlos is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 09-17-2004 , 17:19  
Reply With Quote #2

found a way for 1)
a)
just use
#define SND_STOP (1<<5)
emit_sound(id, CHAN_STREAM, "xyz.wav", 0.0, ATTN_NORM, SND_STOP, PITCH_NORM)

b)
when player connects i check every second until his gametime is bigger zero (can be done with a constant time but when player connects too long it wont work)
then when player is in game i use emit_sound(id, CHAN_STREAM, "xyz.wav"...)
it is important to have in first call of emit_sound CHAN_STREAM and in this one too, otherwise there can be multiple wavs played at once (very annoying)

now i need only help with 2)
__________________
alias White Panther
karlos is offline
Da Bishop
Senior Member
Join Date: Aug 2004
Location: Chester County PA
Old 09-17-2004 , 18:46  
Reply With Quote #3

i can't remember exactly but i do believe the flags are....

a - repeat
b - loop task
c and d have something to do with map times or soemthign

not hvae a very good memory
Da Bishop is offline
Send a message via MSN to Da Bishop
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 09-17-2004 , 19:14  
Reply With Quote #4

dont u mix up with set_task? cause there are a,b but here its numbers like "#define SND_STOP (1<<5)" snd_stop is a flag
or am i wrong?
__________________
alias White Panther
karlos is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 09-18-2004 , 09:31  
Reply With Quote #5

flags define certain things, such as where the message goes and such.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 09-18-2004 , 13:23  
Reply With Quote #6

ok, but do u know which flag does what?
__________________
alias White Panther
karlos is offline
Da Bishop
Senior Member
Join Date: Aug 2004
Location: Chester County PA
Old 09-18-2004 , 15:39  
Reply With Quote #7

whoops, lol, yeah i did mix them up with set_task... hmmm.... sry don't htink i can help, i don't use emit_sound
__________________
Anything that is done can only be done better by urself - since life is a opinion make it the way urs feel its best

~live by it
Da Bishop is offline
Send a message via MSN to Da Bishop
Reply



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


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