Code:

sound SkelVoiceSND = <Voices.wav>; // The sound...
var SkelVoiceVol = 200; // The volume...

ACTION SkelVoice
{
my.skill1 = 200; // Distance player has to be within to play the sound
while(player == null) {wait(1);}
while(my.skill1 > 0)
{
if (vec_dist(my.x, player.x) <= my.skill1)
{
ent_playsound(my, SkelVoiceSND, SkelVoiceVol);
my.skill1 = 0;
}
wait(1);
}
}



Last edited by xXxGuitar511; 05/29/06 16:35.

xXxGuitar511
- Programmer