• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Imported sounds not working?

Status
Not open for further replies.
Level 12
Joined
Sep 28, 2012
Messages
277
Hey, I'm finally starting to adapt to some of the changes with this newish World Editor, but one thing I can't figure out is how to play imported sounds. Here's my process:
  1. I import an mp3 sound file
  2. I click on it and click Use as Sound
  3. I make sure it's not a 3D sound
  4. I make a trigger that plays the sound
  5. No sound is heard.
Bonus Question: Why can't I rename sounds anymore? Now when I do so, the World Editor yells at me about "undeclared variables" with gg_snd_ something.
 
Level 12
Joined
Jan 30, 2020
Messages
875
Ok I'll tell you what I did recently, and it works really well.
Wanted a Bell sound for when people leak in my TD.
- Created the sound as mp3 under audacity.
- Inported it in my map with this path : "Sound\Bell.mp3"
- In Trigger editor, added a global sound variable called Leak
- At Map initialization, I init the sound like this :

JASS:
    set udg_Leak = CreateSound( "Sound\\Bell.mp3", false, false, false, 10, 10, "DefaultEAXON" )
    call SetSoundDuration( udg_Leak, 2163 )
    call SetSoundChannel( udg_Leak, 8 )
    call SetSoundVolume( udg_Leak, 80 )
    call SetSoundPitch( udg_Leak, 1.0 )

I set the volume to 80 because I didn't want it to become really unpleasant, but you'd probably want it set to 127.


And whenever a player leaks, I then simply use :

JASS:
    call StartSound(udg_Leak)

And trust me it works flawlessly, and no need to use the Sound Editor at all
 
Status
Not open for further replies.
Top