• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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

Status
Not open for further replies.
Level 6
Joined
Mar 9, 2009
Messages
175
  • 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:
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
  • 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:

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...
 
Level 6
Joined
Mar 9, 2009
Messages
175
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?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
oh sorry i was trying to make like combat sound effect , cant the sound play when the previous one haven't finish playing ?

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
 
Level 14
Joined
Jul 25, 2011
Messages
1,065
  • 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.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
  • 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.

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...

o2bryan said:
so there is no other way to create combat sound effect change?

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.

Hashjie said:
 
Level 6
Joined
Mar 9, 2009
Messages
175
o so that is no way to make multiple sound effect Y__Y , because I love crashing and blasting sound altogether huhu .
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
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 ;)

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...

JASS:
function NewSoundEx takes string fileName, integer duration, boolean looping, boolean is3D, boolean stop, integer fadeInRate, integer fadeOutRate, string eax returns Sound

JASS:
function NewSound takes string fileName, integer duration, boolean looping, boolean is3D returns Sound

JASS:
 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 :)
 
Status
Not open for further replies.
Top