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

Sound/Sound Triggering

Status
Not open for further replies.
Level 5
Joined
Aug 2, 2004
Messages
65
Hi is it possible to add extra death sounds to a unit?
and id also like to know how to put random sounds on an object if they are alive (the sounds are chosen and the trigger chooses 1 every so often at random to play) Because i want idle sounds for enemies that the player can hear.
 
Level 8
Joined
Jul 3, 2004
Messages
334
Solution #1: Adding extra death sounds.

Try deleting the existing death sounds for that unit and trigger the sounds.

Code:
Sound1
    Events
        Unit - A unit Dies
    Conditions
        (((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True) and ((Unit-type of (Dying unit)) Equal to *your unit*)
    Actions
        Sound - Play *your sound* at 100.00% volume, located at (Position of (Dying unit)) with Z offset 0.00



Solution #2: Random Living Sounds

This is a little tricky, but, with a little bit of logic, you can figure it out.

Code:
Living Sound
    Events
        Time - Every *your amount* seconds of game time
    Conditions
    Actions
        Sound - Play *your sound* at 100.00% volume, located at (Position of *your unit*) with Z offset 0.00

Corry about #2, I can't really find a better way.[/code]
 
Status
Not open for further replies.
Top