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

[Trigger] why is sound ignored?

Status
Not open for further replies.
Level 9
Joined
Jan 14, 2008
Messages
366
nope. the sound is played upon the start of an ability effect.

the trigger really is not more than this:

event
-a unit starts the effect of an ability
condition
-ability equal to "blah"
action
-set temp_point=position of casting unit
-play >sound< at temp_point with z-offset 25
-destroy last played sound

maybe its the instant after destroy action? >_< that would be embarassing...
 
Level 9
Joined
Jan 14, 2008
Messages
366
but it said in one thread sounds should be destroyed like that. to prevent leaks. weird.

ok suggestion 1: storing sound in variable

wont work because then the trigger is not multi-instanceable. :eek:

suggestion 2: destroying >last played sound< before playing new one

sounds like the optimal solution, but then when the trigger fires twice rapidly, the first sound will be cut off.

is there no elegant solution for this problem ._. ?
how do the mapping-veterans destroy their sound leaks?

thanks alot still!
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
It's very simple:

  • event
    • a unit starts the effect of an ability
  • condition
    • ability equal to "blah"
  • action
    • set temp_point=position of casting unit
    • destroy last played sound
    • play >sound< at temp_point with z-offset 25
just switch the last 2 and you're fine.


PS: Next time, use the
  • tags. To use these, right click the name of your trigger in the right half of the Trigger Editor and choose 'Copy as Text'. Then paste that between the [TRIGGER] tags and you've got a understandable trigger posted here.
 
Level 9
Joined
Jan 14, 2008
Messages
366
just tried that, and the sound doesnt play =/

gladly tough i found out that you dont actually have to destroy sounds unless they are globals. so theres no need for any leak preventing actions.

thanks still for your time!
 
Level 11
Joined
Dec 31, 2007
Messages
780
but it said in one thread sounds should be destroyed like that. to prevent leaks. weird.

if you read the whole thing ... and i mean THE WHOLE THING all of those idontknowhowmanypages pages

later people say that sounds doesnt leak so dont destroy them... my map uses a lot of them and i had no problems with them. Coz once you have destroyed sound's original variable (the one you create in object editor while editing) the sound can no longer be played

EDIT: lol... i posted a bit late this time :p
 
Status
Not open for further replies.
Top