• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

SOUNDSs (not working or working only onece)

Status
Not open for further replies.
Level 13
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