Seems Not To Work?
#3563 posted by
ranger on 2025/01/20 03:37:49
void () thingy =
{
self.solid = SOLID_BBOX;
self.skin = 0;
self.frame = 0;
self.classname = "device";
precache_model ("progs/d.mdl");
precache_model ("progs/d2.mdl");
setmodel (self, "progs/d.mdl");
setsize (self, '-8 -8 -8', '8 8 8');
precache_sound ("misc/glass1.wav");
precache_sound ("ambience/elec1.wav");
self.health = 1;
self.th_die = dDead;
self.takedamage = DAMAGE_YES;
sound(self, CHAN_BODY, "ambience/elec1.wav", 1.0, ATTN_STATIC);
};
void () dDead =
{
self.takedamage = DAMAGE_NO;
self.solid = SOLID_NOT;
self.classname = "device";
sound (self, CHAN_VOICE, "misc/glass1.wav", 1.00, ATTN_NORM);
self.skin = 1;
if (((random () * 10) >= 7))
self.frame = 1;
else
self.frame = 2;
if ((self.health <= -80))
self.frame = 3;
ThrowGib ("progs/glass1.mdl", -60);
ThrowGib ("progs/glass2.mdl", -40);
sound(self, CHAN_BODY, "misc/null.wav", 0.0, ATTN_STATIC);
};
#3564 posted by
ranger on 2025/01/20 03:40:48
changed thingy to looping electricity sound elec1, but seems to not work ingame? i don't hear it unless it's "ambientsound"?
Very Strange?
#3565 posted by
ranger on 2025/01/20 03:52:44
Just confirmed that it doesn't work on my side
Seems to only work if i put the sound into its animation frame... but the problem is that it's not playing/looping correctly as the model doesn't have enough frames?
and adding this doesn't work (no sound plays)
self.think = AmbientTestSound;
self.nextthink = time + 10 *random();