AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   catch sound (https://forums.alliedmods.net/showthread.php?t=92330)

One 05-13-2009 18:03

catch sound
 
ho to catch the track & show as hp?

example :

tracks :

1.wav
2.wav
3.wav
100.wav

if track 1.wav is playing, player HP = 1
if track 20, player HP = 20

max tracks : 6
so player hp max 6

SchlumPF* 05-13-2009 18:49

Re: catch sound
 
you can only check emitted sounds by
FM_EmitSound(ent, iChannel, const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch)

commands like spk are clientside

One 05-13-2009 19:15

Re: catch sound
 
what is with the server sounds? or map sounds? i mean the sounds that nobody plays. like de_torn background sounds?!

or when u push any buttons on a map to play a sound.
or u drive a wheel.
or or or or...

or the weapon sounds...

if u have a m4a1 & shoot, the sound 1 willbe played ( m4 sound )

i mean catching this sounds & not a key or ....

SchlumPF* 05-13-2009 19:51

Re: catch sound
 
weapon sounds cannot be handled by FM_EmitSound although it should be emitted too.
func_buttons have a few preset sounds which can be set/get via keyvalues, costum sounds are triggered through a ambient_generic (whichs pev_targetname is the func_buttons pev_target).
background sounds should be a ambient_generic too.

Owyn 07-28-2009 14:28

Re: catch sound
 
what can handle weapon sounds and footsteps if possible?


All times are GMT -4. The time now is 01:32.

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