Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: how to stop sound?

  1. #1
    Private
    Join Date
    Dec 2012
    Posts
    20
    Thanks
    0
    Thanked 14 Times in 7 Posts

    how to stop sound?

    Hello everybody! One question, how can I stop playLocalSound?

  2. The Following User Says Thank You to Cz3koladowyPotwor For This Useful Post:

    raphael (21st March 2023)

  3. #2
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    One more question: how can i stop ambientPlay? AmbientStop() doesnt work in multiplayer.

  4. #3
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Cz3koladowyPotwor View Post
    Hello everybody! One question, how can I stop playLocalSound?
    Try playing a other sound. =]
    For example a null one. I am not exactly sure how this works.

    Quote Originally Posted by randall View Post
    One more question: how can i stop ambientPlay? AmbientStop() doesnt work in multiplayer.
    Same answer.

  5. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (19th January 2013)

  6. #4
    Private
    Join Date
    Dec 2012
    Posts
    20
    Thanks
    0
    Thanked 14 Times in 7 Posts
    Ok, works. Special thanks to IzNoGoD for help.

    explanation:

    1. Download the attachment and put "stop.wav" and "stop_sound.csv" to your mod.
    2. Open stop_sound.csv and change the channel in which the sound has stopped work. (position 12)

    Click image for larger version. 

Name:	tut1.png 
Views:	114 
Size:	102.4 KB 
ID:	115

    3. Open your "yoursound.csv" sound and change your channel name on the same like in "stop_sound.csv".

    exemplary ".csv" with my sound, which I need to stop:

    Click image for larger version. 

Name:	tut2.png 
Views:	115 
Size:	147.3 KB 
ID:	116


    4. Where you want to stop the sound give it:

    self PlayLocalSound("stop");

    exemplary:

    self PlayLocalSound("music"); wait 5; self PlayLocalSound("stop");


    remember that your. "csv" and "stop_sound.csv" must have the same name channels to stop the music.

    zzzz_myins_sounds.iwd


    //Edit: easier without download new .wav

    add new line to ur .csv:

    stop,,2,null.wav,0.8,0.8,,,,,,announcer,,,,,,,,,,, ,,

    and only change name channel.
    result in my mod http://beta.xfire.com/video/5daecc
    Last edited by Cz3koladowyPotwor; 19th January 2013 at 18:53.

  7. The Following 4 Users Say Thank You to Cz3koladowyPotwor For This Useful Post:

    EvoloZz (19th January 2013),kung foo man (19th January 2013),Ni3ls (19th January 2013),raphael (21st March 2023)

  8. #5
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    So if a local sound stops other local sound, what about playing them in the same time without stopping?

  9. #6
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by EvoloZz View Post
    So if a local sound stops other local sound, what about playing them in the same time without stopping?
    Most likely impossible, but it might be possible with two sounds that have different channels or somehow fixable by patch like kung foo man did with non-colliding players.

  10. #7
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Use the auto-channel for one of them. Seemed to work with the cod4mod.

  11. #8
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    Tried auto, and the sound did not play at all

  12. #9
    Private
    Join Date
    Mar 2013
    Posts
    12
    Thanks
    2
    Thanked 6 Times in 5 Posts
    hi, you can stop the music by this way: PlaySound("null"); you can find the null.wav file in iw_04/sound folder. i think this works for cod2, and MusicStop( <time> ); in cod4(i dont know, maybe works for cod2 too)

  13. The Following User Says Thank You to kat_ For This Useful Post:

    kung foo man (5th March 2013)

  14. #10
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    Can I ask a question? What's the difference between PlaySound and PlayLocalSound?

Posting Permissions

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