• 🏆 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!

Stopping a sound

Status
Not open for further replies.
Level 4
Joined
Sep 15, 2013
Messages
53
I have this:
Event: whenever a unit dies
Condition: if the dying unit is a hero
Action: a sound will play.
But i want to stop the sound from playing, once the hero respawns. I wanna ask how can i achieve this? Can someone help me. Thanks!
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
For some reason the topic creator decided to PM me instead of replying to the thread. For this reason I have created a bump.

There should be an action to stop a sound playing. When hero revives you run that action on the sound. The sound should be stored in a variable and reused.

Attached is a demo map showing how one can play and stop sounds. Type "play" to start the sound and "stop" to stop it.
 

Attachments

  • Stop Sound Demo.w3x
    17.6 KB · Views: 30
Status
Not open for further replies.
Top