Problem: Destroying Sound

carbonduck

New Member
Reaction score
4
I'm using the BUTCHER.WAV ("Ahhh... fresh meat") sound from the editor. I've enabled "Use as Sound" and everything is fine. I'm playing the sound in a trigger in response to an event.

If I don't destroy the sound, it works fine. The sound plays, I can hear it, everything is great.
Trigger:
  • Actions
    • Sound - Play BUTCHER <gen>


If I do destroy the sound, it doesn't work at all.
Trigger:
  • Actions
    • Sound - Play BUTCHER <gen>
    • Sound - Destroy (Last played sound)


Any idea why?
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
Playing a sound doesn't create a new one, you're just using a sound that's there. You can't use a destroyed sound much in the same way you can't use a removed unit.



Just don't destroy it.


edit: wait, are you only using it once?
 

carbonduck

New Member
Reaction score
4
No, I'm using it every time I use an ability. BUT.. the sound doesn't even play the first time, even before it's been destroyed already.

And I've been destroying all of the sounds in my map since sounds leak. (Right??)
 

carbonduck

New Member
Reaction score
4
I've been destroying sounds in all of my triggers because I was under the impression that sounds would leak. I did some research and found out that is not true. Sounds only need to be destroyed if you create sounds through CreateSound* in JASS.

I wish I knew this earlier. xD Thanks for the help, guys.
 

Zalinian

New Member
Reaction score
0
Trigger:
  • Actions
    • Sound - Play BUTCHER <gen>
    • Sound - Destroy (Last played sound)

Old thread but I figured I'd put my 2 cents in anyway.
I believe your destroying the sound right after you play it. Add a wait/pause between the play and destroy equal to the duration of the sound.
That is if you still need to destroy it for w/e reason.
 

Mindlessbody

New Member
Reaction score
0
How do i remove the chain lightning sound effects but keep the lightning impact animation?I was trying to attached it to a unit but i cant remove the sound effects.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
How do i remove the chain lightning sound effects but keep the lightning impact animation?I was trying to attached it to a unit but i cant remove the sound effects.
You just replied to a thread from last year, which was about a completely different topic. Searching for an answer is good, but if there are no recent, relevant threads, start a new one.

As for your question, the sound is specified in the model for the effect itself. To remove it, you'd need to export, edit, and import the edited model file.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top