sfx_generic.qc
Code: Select all
void() ambient_generic = {
local float volume;
precache_sound (self.noise1);
if (self.sounds == 0)
volume = 0;
else if (self.sounds == 1)
volume = 0.25;
else if (self.sounds == 2)
volume = 0.5;
else if (self.sounds == 3)
volume = 0.75;
ambientsound (self.origin, self.noise1, volume, ATTN_STATIC);
};
Code: Select all
@PointClass base(Targetname) = ambient_generic : "Generic sound" [
noise1(string) : "Sound"
sounds(choices) : "Volume" : 2 = [
0: "None"
1: "Low"
2: "Mid"
3: "High"
]
]
In WorldCraft or Hammer select enity: "ambient_generic"
Name: Can use for start Sound by a Trigger
Sound: Sound/XXX/mysound.wav
Volume: 0=0, 1=25, 2=50, 3=75