Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Editing sound
From Quake Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | ====Syntax:==== | |
+ | <code>void sound(entity e, float channel, string sample, float volume, float attenuation)</code> | ||
− | + | This function is used for playing a sound. | |
− | + | ====Parameters:==== | |
− | + | :<code>channel</code> - (integer) The channel to play the sound on. A sound played on the same channel as another will override the previous one. | |
− | === Parameters === | + | :<code>sample</code> - (string) The path to the sound file. Unlike models, sounds have /sound/ already present, so do not include that directory in the pathname. |
− | + | :<code>volume</code> - (float) A value between 0.0 and 1.0 that controls the volume of the sound. 0.0 is silent, 1.0 is full volume. | |
− | + | :<code>attenuation</code> - (float) A value greater than or equal to 0 and less than 4 that controls how fast the sound's volume attenuated from distance. 0 can be heard everywhere in the level and 3.999 has a radius of about 250 units. | |
− | + | ====Returns:==== | |
− | : | + | :void |
− | : | ||
− | |||
− | |||
− | : | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | : | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:QuakeC Function]] | [[Category:QuakeC Function]] |