Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22

Thread: how to stop sound?

  1. #21
    ... connecting iBuddie's Avatar
    Join Date
    Sep 2013
    Location
    mp_toujane
    Posts
    7
    Thanks
    2
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Tally View Post
    The soundalias has "local" set for the masterslave channel. Try removing the word "local" so that it defaults to "world".
    Hmm still did not work. I checked the client console for errors, but nothing useful there. Also, dist_min and dist_max had no effect when I used music or local as channel (it works with auto).

  2. #22
    ... connecting iBuddie's Avatar
    Join Date
    Sep 2013
    Location
    mp_toujane
    Posts
    7
    Thanks
    2
    Thanked 1 Time in 1 Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •