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

SOUNDSs (not working or working only onece)

Status
Not open for further replies.
Level 14
Joined
Mar 4, 2009
Messages
1,156
I have a problem with sounds.,every sound that i wanna play will not be played.
This is the only one that is playing but only once:ugly:
  • Untitled Trigger 004
    • Events
      • Player - Player 1 (Red) types a chat message containing S as An exact match
    • Conditions
    • Actions
      • Set SOUND[1] = GromPissed3 <gen>
      • Sound - Play SOUND[1]
      • Sound - Destroy SOUND[1]
 
Level 11
Joined
Feb 22, 2006
Messages
752
All sounds made using the sound editor are saved in global variables. So if you set your own global equal to sound X, you're just making a global point to another global pointing to sound handle X. And if you destroy that X, the handle is gone. So even if you set your global to equal to sound X again, you're doing nothing but making it point to a nonexistent sound handle that cannot be played.

There's no reason you should be destroying sounds from the sound editor anyway, since they do not leak.
 
Status
Not open for further replies.
Top