Found a solution now: playLoopSound and stopLoopSound
Code:
name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage
test,,sound.mp3,1,1,,,,1000,2000,auto,streamed,,looping
Code:
ent = spawn("script_model", origin);
ent playLoopSound("test"); //ent emits the sound, the distance values from the soundalias are applied :)
wait 1;
ent playLoopSound("test");
Please note:
- I used auto as channel, I did not test playLoopSound with other channels
- You can play only one loopSound per entity at a time, calling playLoopSound again will stop the previously played sound -> spawn another "script_model" at the same origin to play two interruptable sounds at the same position