1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. Vote for the best entries in the 13th Music Contest Poll.
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

I want to do multiple of sound but it doesn't work help me please

Discussion in 'World Editor Help Zone' started by o2bryan, Feb 8, 2012.

  1. o2bryan

    o2bryan

    Joined:
    Mar 9, 2009
    Messages:
    173
    Resources:
    0
    Resources:
    0
    • GBA
      • Events
        • Unit - A unit Is attacked
      • Conditions
        • (Unit-type of (Triggering unit)) Equal to Footman
      • Action
        • Unit Group - Pick every unit in (Units in (Playable map)) matching ((Unit-type of (Attacking unit)) Equal to Footman)) and do (Actions)
          • Loop - Actions
            • Sound - Play Skill1 <gen> at 90.00% volume, attached to (Attacking unit)


    I want to do multiple of sound but it doesn't work please help me , thank you:grin:
     
  2. Hashjie

    Hashjie

    Joined:
    Apr 20, 2009
    Messages:
    1,515
    Resources:
    0
    Resources:
    0
    What is it that you're trying to accomplish?
    You do realize that this sound gets played for every unit in the map if the attacking unit is a footman?
    You do also realize that playing multiple sounds causes the previous played sounds to stop if they are still playing?

    If you for example have 40 units in your map, a unit gets attacked, the attacked and the attacking unit both are footmans then Play Skill1 is attached with 90% volume to the attacking unit for 40 times in a row...
    Which means only the last sound will be played once since the previous 39 get stopped.

    What you can do is queu the sounds so that the queu'd sounds will be played after the previous one in the queu is finished...
     
  3. o2bryan

    o2bryan

    Joined:
    Mar 9, 2009
    Messages:
    173
    Resources:
    0
    Resources:
    0
    oh sorry i was trying to make like combat sound effect , cant the sound play when the previous one haven't finish playing ?

    by the way how to Que the sound effect ???

    so there is no other way to create combat sound effect change?
     
  4. Hashjie

    Hashjie

    Joined:
    Apr 20, 2009
    Messages:
    1,515
    Resources:
    0
    Resources:
    0
    You would have to create a "queu" (which sounds should be played first and which ones should be played after those).
    Right now you're trying to play multiple sounds at the same time, which is impossible because the previous sounds get interupted/stopped.

    You can't play 2 sounds at the same time. You can however play a sound after the previous sound finnished.

    Why would you even want to play multiple sounds at the same time?
    Do you find it easy to follow a conversation if everyone was talking at the same time...?
    For me it is highly anoying if everyone was talking at the same time, but that's just my personal prefference :p

    I'm not sure what you're trying to accomplish here but if it is that you're trying to play a sound for a specific unit type whenever it attacks a unit, why not use custom unit sounds?

    http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=39614
     
  5. shinji

    shinji

    Joined:
    Jul 25, 2011
    Messages:
    894
    Resources:
    1
    Spells:
    1
    Resources:
    1
    • GBA
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Action
      • Sound - Play Skill1 <gen> at 90.00% volume, attached to (Attacking unit)

    If you want to make a attack sound effect. You can use this trigger or use the object editor.
     
  6. Hashjie

    Hashjie

    Joined:
    Apr 20, 2009
    Messages:
    1,515
    Resources:
    0
    Resources:
    0
    Don't you mean the sound editor instead of object editor?

    Also: He already did this in his first post, this would have the same effect since in his trigger the sound is played once even though it's being itterated through the pick unit loop equally to the amount of units in his map. That's because the previous sounds get interupted/stopped. It should have the same outcome as your trigger...

    He probably wants to change the "Attack" sound set for the unit type footman, which is explained in the tutorial provided in my previous post.

     
  7. o2bryan

    o2bryan

    Joined:
    Mar 9, 2009
    Messages:
    173
    Resources:
    0
    Resources:
    0
    o so that is no way to make multiple sound effect Y__Y , because I love crashing and blasting sound altogether huhu .
     
  8. Hashjie

    Hashjie

    Joined:
    Apr 20, 2009
    Messages:
    1,515
    Resources:
    0
    Resources:
    0
  9. o2bryan

    o2bryan

    Joined:
    Mar 9, 2009
    Messages:
    173
    Resources:
    0
    Resources:
    0
    Yes !! but how can I use that ?? teach me how to use it ? thanks ^^

    sorry my jass thingy very weak , i hope to learn to be one of you ;)
     
  10. Hashjie

    Hashjie

    Joined:
    Apr 20, 2009
    Messages:
    1,515
    Resources:
    0
    Resources:
    0
    If you look at the bottom of the script it shows a few functions.
    In order to use this system all you do is copy the entire script into your map header
    (which is located on top of all the category's inside your trigger editor and is being shown as an icon of your map with the name of your map).
    Then to use it you'll simply call the functions that you need with a custom script.

    For example:

    • Custom script: call NewSoundEx(fileName, duration, loops, is3Dsound, stops, fadeIn, fadeOut, eaxSetting)
    • Custom script: call NewSound(fileName, duration, loops, is3Dsound)
    • Custom script: call ReleaseSound(sound)


    Which values to put in is shown at the bottom of the script...

    Code (vJASS):
    function NewSoundEx takes string fileName, integer duration, boolean looping, boolean is3D, boolean stop, integer fadeInRate, integer fadeOutRate, string eax returns Sound


    Code (vJASS):
    function NewSound takes string fileName, integer duration, boolean looping, boolean is3D returns Sound


    Code (vJASS):
     function ReleaseSound takes sound s returns boolean


    If you want to save the newly created sound to a variable you simply do:

    • Custom script: set udg_yourSoundVariable = NewSound(fileName, duration, loops, is3Dsound)


    The sound that is returned by the function will then be put in yourSoundVariable... This is just to make sure that you can release the sound afterwards:

    • Custom script: call ReleaseSound(udg_yourSoundVariable)


    I'm not sure if it's possible to call the function within the library through custom script though :S... (Can someone please verify or decline this?)

    I hope this helps :)
     
  11. o2bryan

    o2bryan

    Joined:
    Mar 9, 2009
    Messages:
    173
    Resources:
    0
    Resources:
    0
    ok thanks hashjie , the [System] SoundTools creator has taught me ^.^ !