Raised This Month: $ Target: $400
 0% 

Ambient


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
VEN
Veteran Member
Join Date: Jan 2005
Old 05-25-2006 , 05:05  
Reply With Quote #7

Quote:
Case 1: You want to emit it on all players. Just client_cmd(0,"spk sound.wav")
Normally just set attenuation to 0.0 (ATTN_NONE)

Quote:
Case 2: You want to emit it from an ambient generic.

Steps:

1) Create an ambient_generic (create_entity)
2) Set its origin and whatever other properties (entity_set_x, DispatchSpawn)
3) emit_sound on it
No: 3) use ambient_generic by other entity

Emit[Ambient]Sound flags
Code:
#define SND_SPAWNING        (1<<8)      // duplicated in protocol.h we're spawing, used in some cases for ambients #define SND_STOP        (1<<5)      // duplicated in protocol.h stop sound #define SND_CHANGE_VOL      (1<<6)      // duplicated in protocol.h change sound vol #define SND_CHANGE_PITCH    (1<<7)      // duplicated in protocol.h change sound pitch

ambient_generic spawnlags
Code:
#define AMBIENT_SOUND_STATIC            0   // medium radius attenuation #define AMBIENT_SOUND_EVERYWHERE        1 #define AMBIENT_SOUND_SMALLRADIUS       2 #define AMBIENT_SOUND_MEDIUMRADIUS      4 #define AMBIENT_SOUND_LARGERADIUS       8 #define AMBIENT_SOUND_START_SILENT      16 #define AMBIENT_SOUND_NOT_LOOPING       32

Normally ambient_generic is looping.

Also if you have an issues with ambient_generic look into Fall Scream plugin.
VEN is offline
 



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 16:32.


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