emit_sound
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 |
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) |
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 |
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? |
flags define certain things, such as where the message goes and such.
|
ok, but do u know which flag does what?
|
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
|
| All times are GMT -4. The time now is 17:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.