No just use plBiped01_entity instead of player:
Code:
sound snd_hello = <hello_player.wav>; // your wav (adjust)
action statue {
var lv_snd_dist = 100; // 100 quants for play (adjust)
var lv_snd_hdl; // sound handle
// wait for player...
while(!plbiped01_entity){wait(1);}
// statue loop
while(1){
// play when approaching
if(vec_dist(plbiped01_entity.x,my.x)<lv_snd_dist && !snd_playing(lv_snd_hdl)){
lv_snd_hdl=snd_loop(snd_hello, 100, 0); // play the sound
}
// stop loop
if(vec_dist(plbiped01_entity.x,my.x)>lv_snd_dist && snd_playing(lv_snd_hdl)){
snd_stop(lv_snd_hdl);
}
wait(1);
}
}